Heads up! To view this whole video, sign in with your Courses account or enroll in your free 7-day trial. Sign In Enroll

- 2x 2x
- 1.75x 1.75x
- 1.5x 1.5x
- 1.25x 1.25x
- 1.1x 1.1x
- 1x 1x
- 0.75x 0.75x
- 0.5x 0.5x
In our previous scatter plots and histograms, we tried to visualize the Attack data according to a categorical variable, 'Type'. Now we will make a strip plot, which is a series of scatter plots grouped by category.
Strip plot
sns.stripplot(data=pokemon, x='Type', y='Attack')
Adjusting the aspect of plot
sns.catplot(kind='strip', data=pokemon, x='Type', y='Attack', aspect=2)
The aspect parameter can be also be adjusted for some previous functions we have learned: relplot
and catplot
.
Switching the x and y labels will also fix the smooshing of the Type labels:
sns.catplot(kind='strip', data=pokemon, x='Attack', y='Type')
Related Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign upRelated Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign up
You need to sign up for Treehouse in order to download course files.
Sign upYou need to sign up for Treehouse in order to set up Workspace
Sign up