#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 alauve):

 Hmm..

 Okay, I confirm the `RuntimeError` when both `color` and `rgbcolor` are
 specified. But I'm not sure I understand what you are proposing.
  * Do you want a `ValueError` if the keyword `color` is used at all? (or
 if you prefer, `rgbcolor` is used?)
  * Or do you want a `ValueError` if ''both'' are specified? I don't know
 why anybody would do this, but I also don't have an objection to adding
 such a check.

 Is there any reason to have both keywords floating around? Perhaps the
 simplest solution is for me to replace all instances of `rgbcolor` with
 `color` within `plot.py`?  (When I first read this code, I assumed the
 `@rename_keyword` call was a generous short-cut provided to the end-user
 by the code-writer. I certainly don't want to write `rgbcolor=` if I don't
 have to.)



 Replying to [comment:27 paulmasson]:
 > On matters of code, the doctests now pass but documentation building is
 still a problem, with at least two plots failing. Aaron, please try
 building the documentation to see where the errors are.
 >
 > One feature that I do not like in this branch is that `linestyle`
 defaults to automatic. I find solid lines much easier to read and would
 prefer that `linestyle` default to solid. That is in line with Mathematica
 behavior.
 >
 > Also, if both `rgbcolor` and `color` are specified, this branch silently
 overrides the former with the latter. In the current version of `plot.py`,
 specifying both of these options leads to a `RuntimeError` coming from the
 current line 780:
 >
 > {{{
 > @rename_keyword(color='rgbcolor')
 > }}}
 >
 > I was in the future planning to remove that line and add code to raise a
 `ValueError` as Travis had me do in #9654. I think this branch should
 raise the `ValueError` rather than silently override an option, and then
 this decorator can be removed.

--
Ticket URL: <https://trac.sagemath.org/ticket/12962#comment:37>
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.

Reply via email to