Violin#

import hvplot.pandas  # noqa

violin plots are similar to box plots, but provide a better sense of the distribution of data. Note that violin plots depend on the scipy library.

from bokeh.sampledata.sprint import sprint as df

df.head()
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
df.hvplot.violin(y='Time', by='Medal', c='Medal', ylabel='Sprint Time',
                 cmap=['gold', 'silver', 'brown'], legend=False, 
                 width=500, height=500, padding=0.4)
This web page was generated from a Jupyter notebook and not all interactivity will work on this website.