Passing a string to palette is just a convenience. You can
pass a list of colors. T he
palettes are available as a list of colors.
from bokeh. palettes
import Viridis10
Viridis10.reverse()
color_mapper = LinearColorMapper(palette=Viridis10, low=100,
high=1000)
HTH
···
On 9/8/16 3:04 AM, Will Kew wrote:
Is there an easy way to reverse the palette on a
linear color mapper?
color_mapper = LinearColorMapper(palette=“Viridis10”, low=100, high=1000)
``
Works great, but I normally opt for the reverse of the new
Matplotlib palettes (i.e. viridis_r )
Also I noticed that Viridis6 is reversed on the
documentation page
though it seems to not be when you call it.
(Sorry if I've missed something obvious - pre 0.12.2 I used
np.linspace to generate a list of colours from matplotlib )
–
You received this message because you are subscribed to the Google
Groups “Bokeh Discussion - Public” group.
To unsubscribe from this group and stop receiving emails from it,
send an email to bokeh+unsubscribe@continuum.io.
To post to this group, send email to bokeh@continuum.io.
To view this discussion on the web visit [https://groups.google.com/a/continuum.io/d/msgid/bokeh/6397aaa1-314a-4238-a31d-a504592a08a7%40continuum.io](https://groups.google.com/a/continuum.io/d/msgid/bokeh/6397aaa1-314a-4238-a31d-a504592a08a7%40continuum.io?utm_medium=email&utm_source=footer).
For more options, visit [https://groups.google.com/a/continuum.io/d/optout](https://groups.google.com/a/continuum.io/d/optout).
–
Sarah Bird
Developer, Bokeh
[

](http://continuum.io)
http://bokeh.pydata.org/en/0.12.2/docs/reference/palettes.html#bokeh-palettes