Theo75
Theo75

Reputation: 487

Bokeh latest version doesnt' support charts library for simply create a Boxplot

I want to create an interative Boxplot in Google Colab with Bokeh.

I use Bokeh lastest version 2.4.2:

import bokeh
bokeh.__version__

=> 2.4.2

In previous Bokeh versions, it was possible to use:

from bokeh.charts import BoxPlot

to simply create a boxplot with 1 Python line (Cf https://www.geeksforgeeks.org/python-data-visualization-using-bokeh/).

But charts library is now deprecated in last version 2.4.2:

ModuleNotFoundError: No module named 'bokeh.charts'

For 2.4.2 version, I found this example for a Boxplot: https://docs.bokeh.org/en/latest/docs/gallery/boxplot.html

If I fine undestand, we have to compute ourself quartiles, outliers... for each category. Do I right? Does exist a method a little bit more simple?

I didn't find any Bokeh notebooks, including an example of a boxplot here:

https://mybinder.org/v2/gh/bokeh/bokeh-notebooks/master?filepath=tutorial%2F00%20-%20Introduction%20and%20Setup.ipynb

Upvotes: 0

Views: 339

Answers (1)

Cameron Riddell
Cameron Riddell

Reputation: 13407

bokeh ditched their high-level chart interface quite some time ago because it was too much to maintain. Instead they adopted a different package that provided a high level charting interface called Holoviews

Holoviews works with many different renderers, but bokeh is the default, so you can have Holoviews create your plot objects, and then use bokeh to tweak/fine tune them.

https://holoviews.org/gallery/demos/bokeh/boxplot_chart.html#demos-bokeh-gallery-boxplot-chart.

Upvotes: 3

Related Questions