import hvplot.pandas # noqa
bar
can be used on dataframes with regular Index
or MultiIndex
.
from bokeh.sampledata.autompg import autompg_clean as df
table = df.groupby('yr').mean()
table.head()
table.hvplot.bar(y='mpg', height=500)
table = df.groupby(['yr', 'origin']).mean()
table.head()
When mutiple axes are being used on the xaxis, plots can be stacked or unstacked.
table.hvplot.bar(stacked=True, height=500, legend='top_left')
table.hvplot.bar(stacked=False, height=500, rot=60)