hvPlot 0.10 has just been released! Checkout the blog post and support hvPlot by giving it a 🌟 on Github.


import hvplot.pandas  # noqa

box plots are most useful when grouped by additional dimensions.

from bokeh.sampledata.sprint import sprint as df

Name Country Medal Time Year
0 Usain Bolt JAM GOLD 9.63 2012
1 Yohan Blake JAM SILVER 9.75 2012
2 Justin Gatlin USA BRONZE 9.79 2012
3 Usain Bolt JAM GOLD 9.69 2008
4 Richard Thompson TRI SILVER 9.89 2008
boxplot = df.hvplot.box(y='Time', by='Medal', height=400, width=400, legend=False)

Overlay this plot with the jittered scatter plot of the medalist times using the * operator:

boxplot * df.hvplot.scatter(y='Time', x='Medal', c='orange').opts(jitter=0.5)

Use groupby to create a separate plot for each medal type with a widget for selecting between the plots.

df.hvplot.box(y='Time', groupby='Medal', by='Country', ylabel='Sprint Time', height=400, width=600)