#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):
The website
[http://stanford.edu/~mwaskom/software/seaborn/tutorial/color_palettes.html
seaborn] suggests we use a "qualitative" color palette, so the
[http://martin.ankerl.com/2009/12/09/how-to-create-random-colors-
programmatically/ Preiss/Ankerl] idea of using the ''golden ratio'' is
fine. (I actually prefer it to what seaborn does, as the latter would
result in the first plot in a list of seven being colored differently than
the first plot in a list of six.)
Do we have access to seaborn in Sage? Its attempt to adjust for human
perception of hue seems like a good idea. It draws "hue polygons" as a
function of brightness, then intersects a given hue's ray with the polygon
([http://www.husl-colors.org/ HUSL]). (If not, one could port over
Boronine's [https://github.com/husl-colors/husl-python python code], on
which seaborn is based.)
'''Proposed algorithm:'''
{{{
step 1: pick a hue using golden_ratio()
step 2: adjust hue using husl()
}}}
Note that brightness-level isn't mentioned in the algorithm. We should
agree on a level to use, independent of hue. If I understand Boronine's
discussion (and [http://www.husl-colors.org/ HSL sliders demo]) correctly,
there is only one hue-polygon that contains the color 'blue' (brightness =
32.3).
* We might choose brightness = 32.3, to respect Sage's default plot
color. However, the hues along the boundary of the polygon are quite a bit
darker than I'd like to see, e.g., "960000" for red, "005900" for green,
and "005555" for cyan.
* Setting brightness = 40.0 gives a pretty good approximation to 'blue'
("3b3bff") with more vibrant colors along the boundary of the polygon,
e.g., "c00000" for red, "006e00" for green, and "006a6a" for cyan.
--
Ticket URL: <http://trac.sagemath.org/ticket/8164#comment:16>
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.