Skip to main content
Albero Academy

Seaborn vs Matplotlib

When to use each — and how they work together.

Foundations8 min

Seaborn and Matplotlib aren't rivals — they're layers. Understanding the division of labour tells you which to reach for and how to combine them.

The division of labour

Use Seaborn forUse Matplotlib for
Statistical charts fast (dist, box, regression)Full control over every element
Grouping/colouring by a column (hue)Custom/uncommon chart types
Attractive defaultsFine-tuning titles, ticks, annotations
DataFrame → chart in one lineNon-tabular or low-level drawing

Working together

Seaborn draws onto Matplotlib Axes, so you customise the result with everything you know from Matplotlib:

Seaborn draws, Matplotlib refines
fig, ax = plt.subplots(figsize=(8, 5))
sns.boxplot(data=tips, x="day", y="total_bill", ax=ax) # draw with Seaborn
ax.set_title("Bill by day") # refine with Matplotlib
ax.set_ylabel("Total bill ($)")
ax.spines[["top", "right"]].set_visible(False)

Key takeaways

  1. 01Seaborn and Matplotlib are layers, not rivals.
  2. 02Seaborn: fast statistical charts with grouping and good defaults.
  3. 03Matplotlib: full control, custom chart types, fine-tuning.
  4. 04Draw with Seaborn (pass ax=), then refine with Matplotlib.

Finished this chapter?

Mark it complete to track your progress through Seaborn.