I am working to try and replicate code similar to the second graph from this http://fortune.com/fortune500/visualizations/?iid=recirc_f500landing-zone1
There is the default Step Chart in Bokeh, but it does not want to let me add glyphs.
I would like code something like this
from bokeh.charts import Step, show, output_file
# build a dataset where multiple columns measure the same thing
data = dict(
stamp=[.33, .33, .34, .37, .37, .37, .37, .39, .41, .42,
.44, .44, .44, .45, .46, .49, .49],
postcard=[.20, .20, .21, .23, .23, .23, .23, .24, .26, .27,
.28, .28, .29, .32, .33, .34, .35]
)
# create a step chart where each column of measures receives a unique color and dash style
step = Step(data, y=['stamp', 'postcard'],
dash=['stamp', 'postcard'],
color=['stamp', 'postcard'],
title="U.S. Postage Rates (1999-2015)",
ylabel='Rate per ounce', legend=True)
selected_line = Line(line_alpha=1, line_color="firebrick")
nonselected_line = Line(line_alpha=0.2, line_color="blue")
step.add_glyph(data,
step,
selection_glyph=selected_line,
nonselection_glyph=nonselected_line
)
output_file("steps.html")
show(step)
I have tried each way from this page http://docs.bokeh.org/en/latest/docs/user_guide/styling.html#selected-and-unselected-glyphs is there a way to build this plot without the Chart library?