In [ ]:
import hvplot.pandas  # noqa


Kernel density estimate (kde) provides a mechanism for showing the distribution and spread of the data. In hvplot the method is exposed both as kde and density.

In [ ]:
from bokeh.sampledata import sea_surface_temperature as sst

df = sst.sea_surface_temperature
df.tail()

In [ ]:
df.hvplot.kde()


There are many options exposed and explorable using tab completion. In this case we'll create a colormap that spans the rainbow and divide the temperature by month.

In [ ]:
import numpy as np
import colorcet as cc

In [ ]:
categorical_cmap = [cc.rainbow[int(i)] for i in np.linspace(0, 255, 12)]

In [ ]:
df.hvplot.kde(by='time.month', cmap=categorical_cmap, legend='top', height=400)