Block 37: Seaborn: Categorical & Statistical Plots
Visualize distributions and comparisons across groups.
Concepts
- sns.boxplot() and sns.violinplot()
- sns.countplot() for frequencies
- sns.barplot() with confidence intervals
- sns.stripplot() and sns.swarmplot()
Code Examples
See exercise below.
Exercise
Boxplot of tip amount grouped by day of week. Violinplot comparing petal_length by species.
Homework
Describe what a violin plot shows that a boxplot doesn't. When is each more useful?