BoxWhisker#

Download this notebook from GitHub (right-click to download).


Title
BoxWhisker Element
Dependencies
Plotly
Backends
Bokeh
Matplotlib
Plotly
import numpy as np
import holoviews as hv
hv.extension('plotly')

A BoxWhisker Element is a quick way of visually summarizing one or more groups of numerical data through their quartiles.

The data of a BoxWhisker Element may have any number of key dimensions representing the grouping of the value dimension and a single value dimensions representing the distribution of values within each group. See the Tabular Datasets user guide for supported data formats, which include arrays, pandas dataframes and dictionaries of arrays.

Without any groups a BoxWhisker Element represents a single distribution of values:

hv.BoxWhisker(np.random.randn(1000), vdims='Value')

By supplying key dimensions we can compare our distributions across multiple variables.

groups = [chr(65+g) for g in np.random.randint(0, 3, 200)]

box = hv.BoxWhisker((groups, np.random.randint(0, 5, 200), np.random.randn(200)),
                    ['Group', 'Category'], 'Value').sort()

box.opts(height=400, width=600)

For full documentation and the available style and plot options, use hv.help(hv.BoxWhisker).

This web page was generated from a Jupyter notebook and not all interactivity will work on this website. Right click to download and run locally for full Python-backed interactivity.

Download this notebook from GitHub (right-click to download).