Categorical Distribution Plots4:21 with AJ Tran
The box plot function gives us a summary of the spread of data grouped by a categorical variable. Another way of visualizing the distribution is by using the violin plot. The violin plot is like a mix of a box plot and a KDE. It is analogous to the box plot.
sns.catplot(kind='box', data=pokemon, x='Type', y='Attack', kind='box', aspect=2)
sns.catplot(kind='violin', data=pokemon, x='Type', y='Attack', kind='violin', aspect=2)
You need to sign up for Treehouse in order to download course files.Sign up