#8164: automatic rainbow coloring of multiple plot lines
-------------------------------+------------------------
       Reporter:  jason        |        Owner:  was
           Type:  enhancement  |       Status:  new
       Priority:  major        |    Milestone:  sage-6.4
      Component:  graphics     |   Resolution:
       Keywords:               |    Merged in:
        Authors:               |    Reviewers:
Report Upstream:  N/A          |  Work issues:
         Branch:               |       Commit:
   Dependencies:               |     Stopgaps:
-------------------------------+------------------------

Comment (by alauve):

 My two cents, regarding making multi-color curves the default...

 Perhaps, "Mathematica and Maple do it," is not a convincing enough
 argument for most (though I think it is), but what about, "because that's
 what a novice user needs"? Anyhow, this was the impetus for creating
 #12962, as I was not getting what I expected. I certainly wouldn't expect
 my (pre-)calculus student to figure out dictionaries and plot-addition to
 help them distinguish one function from the next.

 Regarding B&W readability, yes, this could be a problem with
 `rainbow()`... and I notice that Mathematica chooses very dark shades for
 their default colors. However, there is an additional problem with
 `rainbow()`: sometimes your second function would be plotted with cyan,
 sometimes your fourth function would be (depending on how many are
 plotted, in total). For a novice trying to learn the different behavior of
 assorted functions, this hardly seems like a good idea.

 Regarding alternatives to `rainbow()`, I really like the golden-ratio idea
 (and it solves my 'additional problem' above). We should start from 'blue'
 as this is Sage's preferred plot color. Try:
 {{{
 h = golden_ratio_conjugate = 0.618033988749895
 
graphics_array([circle((.2,.2),.5,facecolor=Color((.666666+i*h)%1,1,.45,space='hsl'),fill=True,edgecolor='white')
 for i in range(10)]).show(axes=False,figsize=7)
 }}}
 and notice that the first ten entries are identical to those here:
 {{{
 h = golden_ratio_conjugate = 0.618033988749895
 graphics_array([circle((.2,.2),.5,facecolor=Color((.666666+i*h)%1,1,.45,
 space='hsl'),fill=True,edgecolor='white') for i in
 range(15)]).show(axes=False,figsize=10)
 }}}

 I've implemented the following function in #12962, in case anybody wants
 to pull that branch and have a look.
 {{{
 def rainbow_color(i):
     # note: 'blue' has hue-saturation-lightness values (2/3, 1, 1/2).
     h = golden_ratio_conjugate = 0.618033988749895
     return Color((0.666666666666+i*h) % 1, 1, 0.4, space='hsl')
 }}}

--
Ticket URL: <http://trac.sagemath.org/ticket/8164#comment:13>
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.
For more options, visit https://groups.google.com/d/optout.

Reply via email to