Barh#
import hvplot.pandas # noqa
barh()
is similar to .bar()
but plots bars horizontally rather than vertically. These charts can be created from dataframes with regular Index
or MultiIndex
.
from bokeh.sampledata.autompg import autompg_clean as df
table = df.groupby(['origin', 'mfr'])['mpg'].mean().sort_values()
table.head()
origin mfr
North America hi 9.000000
chrysler 17.266667
amc 18.070370
mercury 19.118182
buick 19.182353
Name: mpg, dtype: float64
table.hvplot.barh('mfr', 'mpg', by='origin', stacked=True, legend='bottom_right', height=600)
This web page was generated from a Jupyter notebook and not all
interactivity will work on this website.