Hi I have a rather basic question regarding color. Is there a way to specify a different color for a bar chart or any type of chart where value is greater than some value?
Right now, its simply:
q1 = Bar(topics, label=‘Topic’, values=‘Number of Posts’, title=“Total posts”)
show(q1)
Like I want maybe a green color if ‘Number of Posts’ > 300
The high level charts interface is intended to to make the commonest cases completely trivial. To exert more control, you'll probably want to look at the mid-level bokeh.plotting interface. You can see an example of bar-like plots using the "quad" glyph function here:
With bokeh.plotting you can easily set the individual colors for bars (or whatever glyphs you are display) by setting the "fill_color" property to list of colors. For example, this example shows individually coloring individual circles:
Hi I have a rather basic question regarding color. Is there a way to specify a different color for a bar chart or any type of chart where value is greater than some value?
Right now, its simply:
q1 = Bar(topics, label='Topic', values='Number of Posts', title="Total posts")
show(q1)
Like I want maybe a green color if 'Number of Posts' > 300
Bryan’s already answered how you could do this for now, but if you could
open a github issue
for this feature idea, that would be great.
On 2/27/16 4:59 PM, Mudit Uppal wrote:
Hi I have a rather basic question regarding color.
Is there a way to specify a different color for a bar chart or
any type of chart where value is greater than some value?
Right now, its simply:
q1 = Bar(topics, label='Topic', values='Number of Posts',
title=“Total posts”)
show(q1)
Like I want maybe a green color if 'Number of Posts' >
300
Thanks
–
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,
To post to this group, send email to [email protected].
To view this discussion on the web visit [](https://groups.google.com/a/continuum.io/d/msgid/bokeh/9bcf9cdb-77a9-4be6-a9bb-ea96f03a9c4d%40continuum.io?utm_medium=email&utm_source=footer) .