- I wanted to make a fairly custom legend which actually lived on the plot (for space constraints).
You can see it here:
and the code here:
unfortunately this is using an older version of bokeh, so you can’t just copy and paste that code.
but it’s pretty similar. it will be something like:
fig = figure(title="U.S. natural gas produc …
I haven’t tested this but hopefully it points you in the right direction.
- In addition, I made a legend for my washmap - but that was in a seperate plot that was then assembled with hplot/vplot.
You can see the final visualization here:
and some of the code here:
the rest of the code is in that repo e.g.: https://github.com/birdsarah/pycon_2015_bokeh_talk/blob/master/washmap/washmap/water_map.py#L179
Hope this helps,
On Wed, Apr 22, 2015 at 5:00 PM, [email protected] wrote:
Can anyone point me in the right direction for adding a legend to plots based on the ‘rect’ glyph, like http://bokeh.pydata.org/en/latest/docs/gallery/les_mis.html and http://bokeh.pydata.org/en/latest/docs/gallery/unemployment.html ?
I am using the python interface to bokeh and displaying the result in a web browser, if it matters. In my usage, I would like to have a legend indicating the values behind the color scale. Is the legend something that is packages as an object, or does one have to pretty much roll your own code like it were a separate plot?
Thanks in advance,
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 [email protected].
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/41f641b7-89f5-4ed8-b4d2-a6c93997c29b%40continuum.io.
For more options, visit https://groups.google.com/a/continuum.io/d/optout.