Using default palettes
Seaborn includes several default palettes that can be easily applied to your plots.
In this example, we will look at the impact of two different palettes on the same
displot
.
This exercise is part of the course
Intermediate Data Visualization with Seaborn
Exercise instructions
- Create a
for
loop to show the difference between thebright
andcolorblind
palette. - Set the palette using the
set_palette()
function. - Use a
displot
of thefmr_3
column.
Hands-on interactive exercise
Have a go at this exercise by completing this sample code.
# Loop through differences between bright and colorblind palettes
for p in ['____', '___']:
sns.set_palette(___)
sns.___(df['fmr_3'])
plt.show()
# Clear the plots
plt.clf()