Kernel Density Estimate (KDE) Plot#
A KDE plot showing the distribution of body mass across penguin species. This plot highlights how different species vary in average size and spread.
import hvplot.pandas # noqa
df = hvplot.sampledata.penguins("pandas")
df.hvplot.kde(
y='body_mass_g',
by='species',
title='Penguin Body Mass by Species (Bokeh)',
xlabel='Body Mass (g)',
ylabel='Density',
yformatter='%.0e'
)
import hvplot.pandas # noqa
hvplot.extension('matplotlib')
df = hvplot.sampledata.penguins("pandas")
df.hvplot.kde(
y='body_mass_g',
by='species',
title='Penguin Body Mass by Species (Matplotlib)',
xlabel='Body Mass (g)',
ylabel='Density',
yformatter='%.0e'
)
See also
This web page was generated from a Jupyter notebook and not all
interactivity will work on this website.