Ticket #13891: trac_13891-fifth_pass.patch

File trac_13891-fifth_pass.patch, 1.2 KB (added by ncohen, 6 years ago)
  • sage/graphs/generic_graph.py

    # HG changeset patch
    # User Nathann Cohen <nathann.cohen@gmail.com>
    # Date 1359551425 -3600
    # Node ID 4b2171ff74f047db903c89d063bab9c1cc71bd71
    # Parent  222c2d8ef79cded2548e535d5eef9997d027d108
    Default parameters for Graph.plot() and Graph.show() -- fifth pass
    
    diff --git a/sage/graphs/generic_graph.py b/sage/graphs/generic_graph.py
    a b  
    1448714487            sage: G=Graph({'a':['a','b','b','b','e'],'b':['c','d','e'],'c':['c','d','d','d'],'d':['e']},sparse=True)
    1448814488            sage: G.show(pos={'a':[0,1],'b':[1,1],'c':[2,0],'d':[1,0],'e':[0,0]})
    1448914489        """
    14490         from sage.graphs.graph_plot import GraphPlot
    14491         return GraphPlot(graph=self, options=options).plot()
     14490        return self.graphplot(**options).plot()
    1449214491
    1449314492    def show(self, **kwds):
    1449414493        """
     
    1451614515        # time.
    1451714516        plot_kwds = {k:kwds.pop(k) for k in graphplot_options if k in kwds}
    1451814517
     14518        return self.graphplot(**plot_kwds).show(**kwds)
     14519
    1451914520    def plot3d(self, bgcolor=(1,1,1), vertex_colors=None, vertex_size=0.06,
    1452014521                     edge_colors=None, edge_size=0.02, edge_size2=0.0325,
    1452114522                     pos3d=None, color_by_label=False,