- Built on Matplotlib — enhances, not replaces it
- Automatic statistical summaries (CI, regression)
- Native pandas DataFrame support:
data=df, x="col" - Use Seaborn for stats; Matplotlib for fine control
sns.set_theme(style="whitegrid") — apply globally- Styles: whitegrid, darkgrid, white, dark, ticks
- Palettes: deep, muted, pastel, bright, colorblind
sns.set_palette("colorblind") for accessibility
sns.histplot(data, x="col", kde=True)- KDE overlay shows shape without bin sensitivity
sns.kdeplot() for smooth density estimation- Compare groups using the
hue parameter
sns.boxplot(data=df, x="cat", y="val")- Shows median, IQR, whiskers, and outlier points
- Ideal for comparing distributions across categories
- Add
hue for a second categorical dimension
sns.violinplot() — KDE + boxplot combined- Reveals bimodal or skewed shapes boxplots miss
split=True for two-group side-by-side comparison- More informative than boxplots for presentations
- Part A: Member age distribution histplot with KDE
- Part B: Revenue distribution comparison across segments
- Apply colorblind palette and whitegrid theme
- Export publication-quality PNG at 300 DPI