Holoviews and Bokeh or Plotly for interactive plots (Jupyter notebooks + HTML)

Tips, discussions, how-tos, libraries...

Post Reply
User avatar
Paul Hockett
Posts: 22
Joined: Mon May 25, 2020 5:17 pm
Location: Ottawa

Holoviews and Bokeh or Plotly for interactive plots (Jupyter notebooks + HTML)

Post by Paul Hockett »


I've still got a lot to learn on the Python plotting front... but for quick and interactive visualisations from (potentially complicated) datasets, I'm finding Holoviews pretty appealing, if a little non-intuitive^ to use at times!

The beauty of the library is that you can pass dimensioned/labelled data containers (e.g. Xarray or Pandas objects) and plot things fairly directly without many lines of boiler-plate code or data reformatting. For the back-end, you can use Matplotlib, Bokeh or Plotly libraries, with the possibility of interactive plots in the output, including HTML versions (for Bokeh and Plotly). For a quick example of this, see the Holoviews intro page.

Stop plotting your data - annotate your data and let it visualize itself.

HoloViews is an open-source Python library designed to make data analysis and visualization seamless and simple. With HoloViews, you can usually express what you want to do in very few lines of code, letting you focus on what you are trying to explore and convey, not on the process of plotting.

Holoviews is also part of its own ecosystem, Holoviz, which aims to "make browser-based data visualization in Python easier to use, easier to learn, and more powerful".

^ Speaking for myself at least, but this is likely mainly a "stupid user" issue, since I'm not totally up to speed on all the terminology and the way the dimensions are handled, but also trying to make really complicated plots straight off the bat. C'est la vie...! For those interested, my early attempts for photoionization data can be found here.

Post Reply