Seaborn for Data Visualisation
Create polished statistical charts in fewer lines using seaborn
Seaborn is a Python visualisation library built on matplotlib that makes statistical charts much easier. With seaborn, you can create distribution plots, box plots, correlation heatmaps, and pair plots in one or two lines.
In data analyst work, seaborn is used for EDA (exploratory data analysis) — quickly understanding distributions, relationships, and patterns before building a report.
Examples
Key Points
- ✓sns.set_theme() at the top of your notebook sets a consistent clean style
- ✓kde=True in histplot adds a smooth density curve over the histogram
- ✓Box plot outliers appear as individual dots beyond the whiskers — seaborn shows these automatically
- ✓Correlation heatmap: values close to 1 or -1 are strong; near 0 are weak
- ✓plt.xticks(rotation=30) rotates x-axis labels to prevent overlapping
Practice Question
What does kde=True do in sns.histplot()?