Bokeh 0.12.15 Released

/ Bryan Van de Ven

We are pleased to announce the release of Bokeh 0.12.15!

This release has the following highlights:

  • Addressed several WebGL bugs #6867, #7087, #7211, #7681
  • Switched to Chrome headless for tests, which will support WebGL testing #6594
  • Updated data source selections to be proper Bokeh models #6845
  • Fixed memory leaks with certain kinds of Bokeh server usage #7468
  • Added new glyphs for hexagon markers and hex tiles, and a new hexbin method #7638, #4786
  • Completed BokehJS port to TypeScript #6481

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.

NumFOCUS Fiscal Sponsorship

Perhaps the biggest news of this release cycle did not involve any code at all: Bokeh joins NumFOCUS Sponsored Projects. Over the years Bokeh has enjoyed generous financial support from the DARPA XData Initiative and from Anaconda, Inc. However, it has always been a goal to have Bokeh join NumFOCUS in order to place it within an even wider Open-Source Community.

Non-profit NumFOCUS helps shoulder the burden of financial and orther obligations around administering Open Source, leaving project committees to decide how best to utilize available funds. The Bokeh committee is composed of:

  • Sarah Bird
  • Ryan Hafen
  • Andy Terrel
  • Jake Vanderplas
  • Bryan Van de Ven

Now that it is easier than ever, if you or your company find value in Bokeh, please consider making a donation to directly support its development.

Hex Tiling and Binning

The issue #4786: Add a hex tiling glyph has been open for two years, but it wasn’t until recently that all the necessary things (i.e. aspect ratio control) were in place. This release sees the addition of a new HexTile glyph. Hexagonal tilings are useful for several things including binned aggregations such as these plots of one million NCAA shots:

These were created by binning manually and using Hextile directly, however it’s often even simpler. A new hexbin method for basic hexagonal binning has been added to the Figure class:

x = 2 + 2*np.random.standard_normal(n)
y = 2 + 2*np.random.standard_normal(n)

p.hexbin(x, y, size=0.5, hover_color="pink", hover_alpha=0.8)

For more sophisticated use-cases, such as scaling individual tiles by another quantity, you can use HexTile directly, or look for new features based on this coming soon to HoloViews.

Selection Architecture Update

One of the most useful features of Bokeh is the ability to access and inspect the selections users make with various selection tools. For several years, this information has been available in a complicated and hard to manage plain dictionary structure:



This has needed improvement for a long time. Happily, Claire Tang decided to tackle this issue, and now there is a proper Bokeh model Selection with meaningful properties.



It’s much clearer (and simpler to document) what property corresponds to a particular kind of selection. Look for selected.image_indices for image hit testing support to be added in the next release.

A quick note: Although existing code for reading selection continues to work (and will for the forseeable future), it was not possible to maintain compatibility for writing selections. If you need to programmatically set a selection in a CustomJS or Bokeh server callback, you must use new Selection models directly.

BokehJS Ported to TypeScript

BokehJS was originally written in CoffeeScript. At the time, this decision helped Python developers without much JavaScript knowledge get Bokeh up and running quickly. However, as the project has matured, it’s become clear that other tools will help more with long-term maintenance.

Thanks to a tremendous effort by Mateusz Paprocki, I can happily report that BokehJS is now written entirely in TypeScript. The porting effort has already helped uncover some previously unknown bugs, and made core developers more effective and efficient. It’s my hope that this switch will also make BokehJS development more accessible to new JavaScript developers.

JupyterLab Support for push_notebook

A few releases ago we were pleased to announce Bokeh compatibility with the new JupyterLab project. At the time, we had the resources to get basic plots and apps functioning, but not the push_notebook feature. I am happy to report that Luke Canavan pushed new work on the Bokeh JupyterLab extension, and it is now on par with classic notebook support, including push_notebook:

Image of JupyterLab use

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