#13891: Default parameters for Graph.plot() and Graph.show()
---------------------------------+------------------------------------------
Reporter: ncohen | Owner: jason, ncohen, rlm
Type: enhancement | Status: needs_work
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:
---------------------------------+------------------------------------------
Changes (by slabbe):
* status: needs_review => needs_work
Comment:
1. show method of a graph doesn't do anything now. There is a line missing
in the code.
2. 2 doctests are still failing (see [comment:42 Comment 42])
'''Questions.'''
A. Sorry to ask this question, but why is figsize not an option for `plot`
again?
B. If I understand correctly,
- `DEFAULT_SHOW_OPTIONS` will affect `g.show()`.
- `DEFAULT_PLOT_OPTIONS` will affect `g.plot()`.
but
- `DEFAULT_SHOW_OPTIONS` will not affect `g.plot()`.
- `DEFAULT_PLOT_OPTIONS` will affect `g.show()`.
Right?
'''Comments.'''
C. This works:
{{{
sage: sage.graphs.graph_plot.DEFAULT_PLOT_OPTIONS['edge_color']='red'
sage: g = graphs.PetersenGraph()
sage: g.plot() # red edges
sage: g.show() # does not show anything
sage: g = Graph({3:[4,5]})
sage: g.plot() # red edges
sage: g.show() # does not show anything
}}}
D. This is now ok:
{{{
sage: g = graphs.PetersenGraph()
sage: p = g.graphplot()
sage: p.plot(my_favorite_useless_option_I_always_used_in_my_code=45)
/Users/slabbe/Applications/sage-5.6.rc0/local/bin/sage-ipython:1:
DeprecationWarning: This method takes no argument ! You may want to give
it as an argument to graphplot instead.
See http://trac.sagemath.org/13891 for details.
#!/usr/bin/env python
}}}
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/13891#comment:45>
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.