Ticket #13891: trac_13891-fourth_pass.patch

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

    # HG changeset patch
    # User Nathann Cohen <nathann.cohen@gmail.com>
    # Date 1359465468 -3600
    # Node ID 222c2d8ef79cded2548e535d5eef9997d027d108
    # Parent  e3d66ffe7e46871675c18f49f13c4120cc160319
    Default parameters for Graph.plot() and Graph.show() -- typos and useless graphplot method
    
    diff --git a/sage/graphs/generic_graph.py b/sage/graphs/generic_graph.py
    a b  
    309309from sage.rings.rational import Rational
    310310from generic_graph_pyx import GenericGraph_pyx, spring_layout_fast
    311311from sage.graphs.dot2tex_utils import assert_have_dot2tex
     312from sage.misc.superseded import deprecated_function_alias
    312313
    313314class GenericGraph(GenericGraph_pyx):
    314315    """
     
    1451514516        # time.
    1451614517        plot_kwds = {k:kwds.pop(k) for k in graphplot_options if k in kwds}
    1451714518
    14518         return GraphPlot(graph=self, options=plot_kwds).show(**kwds)
    14519 
    1452014519    def plot3d(self, bgcolor=(1,1,1), vertex_colors=None, vertex_size=0.06,
    1452114520                     edge_colors=None, edge_size=0.02, edge_size2=0.0325,
    1452214521                     pos3d=None, color_by_label=False,
  • sage/graphs/graph_plot.py

    diff --git a/sage/graphs/graph_plot.py b/sage/graphs/graph_plot.py
    a b  
    2626
    2727**Plot options**
    2828
    29 Here is the list of options accepted by :meth:`GraphPlot.plot` and the
     29Here is the list of options accepted by :meth:`GenericGraph.plot` and the
    3030constructor of :class:`GraphPlot`.
    3131
    3232.. csv-table::
     
    7777**Default options**
    7878
    7979This module defines two dictionaries containing default options for the
    80 :meth:`~GraphPlot.plot` and :meth:`~GraphPlot.show` methods. These two
     80:meth:`GenericGraph.plot` and :meth:`GenericGraph.show` methods. These two
    8181dictionaries are ``sage.graphs.graph_plot.DEFAULT_SHOW_OPTIONS`` and
    8282``sage.graphs.graph_plot.DEFAULT_PLOT_OPTIONS``.
    8383
     
    476476            ...           vn = vector(((x-(vx[v0]+vx[v1])/2.),y-(vy[v0]+vy[v1])/2.)).norm()
    477477            ...           assert vn < tol
    478478
    479 
    480479        """
    481480        for arg in edge_options:
    482481            self._options[arg] = edge_options[arg]