Violin Plot#
A violin plot showing the distribution of flipper lengths for each penguin species. This combines box plot structure with a smoothed density curve.
import hvplot.pandas # noqa
df = hvplot.sampledata.penguins('pandas')
df.hvplot.violin(
y='flipper_length_mm',
by='species',
title='Violin Plot by Species (Bokeh)',
ylabel='Flipper Length (mm)',
)
import hvplot.pandas # noqa
hvplot.extension('matplotlib')
df = hvplot.sampledata.penguins('pandas')
df.hvplot.violin(
y='flipper_length_mm',
by='species',
title='Violin Plot by Species (Matplotlib)',
ylabel='Flipper Length (mm)',
)
See also
This web page was generated from a Jupyter notebook and not all
interactivity will work on this website.