#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 ppurka):
Replying to [comment:16 slabbe]:
> A. Somebody can explain me what is the specification differences between
{{{show}}} and {{{plot}}}?
`plot` returns an object of class `Graphics`. `show` actually calls
matplotlib, renders the `Graphics` object, and then displays the result.
This separation is used when you want to combine one or more graphics on
the same figure. You can do the following now
{{{
(graphs.CycleGraph(3).plot() + graphs.CycleGraph(5).plot()).show()
}}}
> B. Why do you remove the element from the kwds? Is there some efficiency
gain?
This is fine. It is not for efficiency, but to remove the kwds which are
not handled by the `GraphPlot` class.
> C. Should not `{}` be the default ? In genereal, this should be a dict.
I guess None is fine.
>
> {{{
> "edge_colors" : None,
> }}}
I have no opinion on this. As long as it works, I am fine with either of
None or {}. :)
I have been quite tied up with deadlines lately, so sorry for the delay in
reviewing this. Currently, this doesn't apply to 5.6.beta0. I will see if
I have an older compiled version that I can use. What I wanted to test and
check was whether it is possible to set some value in `SHOW_OPTIONS` from
`sage/plot/graphics.py` (by using the method I mentioned in comment:7) and
have the same value reflected in the `GraphPlot` code. The last time I had
checked this, it didn't work.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/13891#comment:18>
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 post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en.