Seaborn is a statistical visualization library built on Matplotlib. It turns common analytical charts — distributions, relationships, category comparisons — into one-liners, applies attractive defaults, and works directly with pandas DataFrames.
What it adds over Matplotlib
- Less code — a grouped, coloured, legended chart in one call.
- Statistical smarts — automatic aggregation, confidence intervals, regression fits, KDEs.
- DataFrame-native — pass column names, and Seaborn handles the rest.
- Beautiful defaults — sensible palettes and themes out of the box.
import seaborn as snsimport matplotlib.pyplot as plttips = sns.load_dataset("tips")sns.scatterplot(data=tips, x="total_bill", y="tip", hue="time")plt.show()
Key takeaways
- 01Seaborn is a statistical viz library built on Matplotlib.
- 02It makes common analytical charts one-liners with attractive defaults.
- 03It works natively with pandas — pass column names via data=, x=, y=, hue=.
- 04Import as sns; it complements (not replaces) Matplotlib.
