#12962: Implement multi-function plotting options in plot()
-------------------------------------+-------------------------------------
Reporter: alauve | Owner: was
Type: enhancement | Status: needs_work
Priority: minor | Milestone: sage-7.3
Component: user interface | Resolution:
Keywords: plot, linestyle, | Merged in:
color |
Authors: Aaron Lauve | Reviewers: Paul Masson
Report Upstream: N/A | Work issues:
Branch: | Commit:
public/graphics/multi_function_plot_options-12962|
02f19a24c59dd2a95801282725909f63924c3340
Dependencies: | Stopgaps:
-------------------------------------+-------------------------------------
Comment (by paulmasson):
The `@rename_keyword` decorator in this file first appeared in #4201. On
the same ticket this decorator and `@options` were added to
`misc/decorators.py`. The description for the latter is about the
convenience of the end user, so I think we can assume the same for the
former.
The functions in a plot get passed to `line.py` as subplots, and the
`_allowed_options` for lines include `rgbcolor` but not `color`. We can't
just rename keywords here that are expected to have a certain name
elsewhere, unless you want to track down every plot file that will get
output from `plot.py` and change all of them.
What Travis had me do in #9654 was raise the `ValueError` only if both
keywords were used at the same time. This lets the end user input either
keyword as desired but avoids conflicting information that might confuse.
On #9654 color values were passed to another keyword, so I did the check
to make sure only one was present and set the new keyword value. For this
ticket `rgbcolor` is expected in other places, so after checking that only
one is present you could use presumably use the function
`rename_keyword(color='rgbcolor')` when `color` is present to copy over
values, but then always use the keyword `rgbcolor` when passing values
elsewhere.
This reply is bit long-winded, but I'd like to have a record of some of
the details of how plotting works in Sage. Let me also know if I've not
yet been clear enough.
--
Ticket URL: <https://trac.sagemath.org/ticket/12962#comment:38>
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 https://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.