import hvplot.pandas # noqa
errorbars
are most helpful when overlayed with other plot types. To do this we'll use the *
operator.
from bokeh.sampledata import perceptions
data = perceptions.numberly.describe().transpose().sort_values('mean')
data
First we'll use just one column to set the size of the errorbars around 'mean'.
data.hvplot.scatter(y='mean', ylabel='amount') * data.hvplot.errorbars(y='mean', yerr1='std')
Then we'll use two columns. Remember that these are not the absolute placements of the ends of the bars, but the distance from the center.
data['yerr1'] = data['mean'] - data['min']
data['yerr2'] = data['max'] - data['mean']
data.hvplot.scatter(y='mean', ylabel='amount') * data.hvplot.errorbars(y='mean', yerr1='yerr1', yerr2='yerr2')