Bokeh 0.12.16 Released

/ Bryan Van de Ven

We are pleased to announce the release of Bokeh 0.12.16!

This release has the following highlights:

  • Hover tools now work with image glyphs #3886
  • BokehJS exposes a public reset method for Plots #5071
  • Categorical tick labels at all levels may be rotates #7643
  • New CustomJSHover for highly customized tooltip fields #7647
  • Axes may now have fixed positions inside plots #113
  • Small zoom tool enhancements #3126, #3125, #2427
  • MultiLine and Patches now function with categorical ranges #7462

Plus several other bug fixes and documentation improvements. For full details, see the CHANGELOG and Release Notes. Additionally, examples for each release are uploaded to CDN. Click here to download.

If you are using Anaconda, Bokeh can most easily be installed by executing the command conda install -c bokeh bokeh . Otherwise, use pip install bokeh.

Hover Tooltips for images

With the “Selection Refactor” from the last release over with, it was possible to add hover tooltips for images, an often requested feature!

This example was as simple as:

p.add_tools(HoverTool(tooltips=[("x", "$x"), ("y", "$y"), ("value", "@image")]))

You can find more information and details about the various different ways to add image hovers in the User’s Guide

CustomJS for Hover tooltips

Another new hover feature is CustomJSHover, which allows users to completely customize the information presented in a hover tooltip. For example, if you hover over the blue dot on the map below you can see the latitude and lonitude printed out, instead of the underlying web mercator coords:

This used code that looks like:

code = """
    var projections = require("core/util/projections");
    var x = special_vars.x
    var y = special_vars.y
    var coords = projections.wgs84_mercator.inverse([x, y])
    return "" + coords[%d]

        ( 'lon',   '@x{custom}' ),
        ( 'lat',   '@y{custom}' ),

        'x' : CustomJSHover(formatter=code % 0),
        'y' : CustomJSHover(formatter=code % 1),

For users doing GIS related work, HoloViews and GeoViews will wrap this capability up even more neatly.

It’s worth noting that CustomJSHover gets all of the hovered indices, so it’s possible in principle to do simple aggregations or other summarizations. For full details see the Reference Guide

Arbitrary Axes locations

For various reasons, sometimes issues take a very long time. I am happy to report that one the oldest open issues #113 - Axis should have option to have a fixed orientation has been completeted. Now, you can configure the fixed_location property of an axis to fix that axis at that location inside the plot:

Image of arbitrary axis location

Upcoming Work

As mentioned in previously, we are reaching a point of relative stability with respect to Bokeh development. The major tasks for the next few Bokeh releases are these:

  • Allow Bokeh app components to be individually included in arbitrary HTML templates
  • Finish the work to clearly delineate and standardize all modules and APIs

In addition to this, we hope to accomplish as much bug fixing, polishing, and documentation as possible in the coming few months.

As we get closer to a Bokeh 1.0 release, I’d like to thank the 287 total contributors who have helped make Bokeh such an amazing project. If you’re interested in helping out, drop by the Dev Chat Channel!


Bryan Van de Ven