#13891: Default parameters for Graph.plot() and Graph.show()
---------------------------------+------------------------------------------
Reporter: ncohen | Owner: jason, ncohen, rlm
Type: enhancement | Status: needs_review
Priority: major | Milestone: sage-5.7
Component: graph theory | Resolution:
Keywords: | Work issues:
Report Upstream: N/A | Reviewers: Punarbasu Purkayastha,
Sébastien Labbé
Authors: Nathann Cohen | Merged in:
Dependencies: #13862 | Stopgaps:
---------------------------------+------------------------------------------
Comment (by slabbe):
1. I just added a patch which adds the notes about what dict affect what
function. Do you agree to fold it into yours?
2. Another question (it should be my last now!!): What are the available
options for `show` or for `DEFAULT_SHOW_OPTIONS` ?
To know available options for `plot`, I may look at the keywords of the
default dict. I think they are complete right?
{{{
sage: sage.graphs.graph_plot.DEFAULT_PLOT_OPTIONS.keys()
['edge_color', 'tree_orientation', 'layout', 'vertex_labels', 'max_dist',
'partition', 'loop_size', 'heights', 'color_by_label', 'dist',
'graph_border',
'iterations', 'edge_colors', 'edge_style', 'edge_labels',
'vertex_size','talk']
}}}
or at the following docstring :
{{{
sage: g.plot? # they do not corresponds exactly with the defaut dict, but
it is not too bad
}}}
But, for show, it seems more difficult to know the possible options. The
keywords of the default dict contain only one :
{{{
sage: sage.graphs.graph_plot.DEFAULT_SHOW_OPTIONS.keys()
['figsize']
}}}
and the docstring of `show` does not say much about those options "not
used by plot" :
{{{
sage: g = graphs.PetersenGraph()
sage: g.show?
Docstring:
Shows the (di)graph.
For syntax and lengthy documentation, see G.plot?. Any options not
used by plot will be passed on to the Graphics.show method.
Note: See the documentation of the "sage.graphs.graph_plot" module
for
information on default arguments of this method.
EXAMPLES:
sage: C = graphs.CubeGraph(8)
sage: P = C.plot(vertex_labels=False, vertex_size=0,
graph_border=True)
sage: P.show() # long time (3s on sage.math, 2011)
}}}
Could we add a sentence in the above show docstring explaining where we
can find what are the possible options for show accepted by matplotlib?
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/13891#comment:49>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.