2 min read

Bokeh has released their first stable version. Bokeh is an interactive visualization library that targets modern web browsers for presentation. Bokeh 1.0 marks the progress of making Bokeh a truly independent project in the context of a wider OSS community. Bokeh 1.0 comes with new features and other fixes and improvements. These include fixing patches with holes, a new scatter, JSON export and embed etc.

Patches With Holes

Patches with holes are often useful for working with GIS data or maps, and support all the usual and expected hover and hit-testing interactions. They are also helpful in filling contour plots. The Patches with holes approach adds a new glyph type MultiPolygons, inspired by GeoJSON format of sub-polygons. The GeoJSON specifies an “exterior ring” followed by optional “holes” inside the exterior ring.

Bokeh Patch holes

Source: Bokeh Github

A New Scatter

Scatter marker type is now parameterizable in the Bokeh 1.0 release. The scatter glyph method creates a new Scatter object, that can specify the marker type of each data point individually. This approach with a parameterized scatter is useful to keep all the data inside a single ColumnDataSource. This capability is especially useful together with a new factor_marker transform that can map categorical values to marker types.

A new function to bokeh.embed

Bokeh 1.0 adds a new function to bokeh.embed. This function can be called on any Bokeh object, e.g plots or layouts, and the output of the call is a block of JSON that represents a Bokeh Document for obj.

This JSON output can be used in any HTML document by calling a single function from JavaScript: Bokeh.embed.embed_item(item, “myplot”)

The first parameter is the JSON output and the second parameter is the id of the div to embed the content into.

Testing improvements

Bokeh unit tests can now run continuously on Windows. Their Selenium integration testing machinery has also been rebuilt and expanded. Almost 200 Selenium tests can run continuously to explicitly exercise various Bokeh features and behaviors.

These are just a select few updates. For full details, see the CHANGELOG and Release Notes.

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

Read Next

How to create a web designer resume that lands you a Job.

Is your web design responsive?

“Be objective, fight for the user, and test with real users on the go!” – Interview with design purist, Will Grant

Content Marketing Editor at Packt Hub. I blog about new and upcoming tech trends ranging from Data science, Web development, Programming, Cloud & Networking, IoT, Security and Game development.