Seaborn Cheat Sheet
Seaborn statistical visualization cheat sheet covering distribution, relational, and categorical plots plus heatmaps and figure-level facet grids.
1 PageBeginnerApr 2, 2026
Distribution & Relational Plots
Explore relationships and distributions.
python
import seaborn as snsimport matplotlib.pyplot as pltsns.set_theme(style="whitegrid")sns.scatterplot(data=df, x="total_bill", y="tip", hue="time", size="size")sns.lineplot(data=df, x="date", y="value", hue="category")sns.histplot(data=df, x="age", bins=30, kde=True)plt.show()
Categorical Plots
Compare a numeric variable across categories.
python
sns.boxplot(data=df, x="day", y="total_bill", hue="sex")sns.violinplot(data=df, x="day", y="total_bill")sns.barplot(data=df, x="day", y="total_bill", estimator="mean", errorbar="ci")sns.countplot(data=df, x="day")
Correlation & Pairwise Plots
Visualize correlations across many variables.
python
sns.pairplot(df, hue="species") # matrix of pairwise plotscorr = df.corr(numeric_only=True)sns.heatmap(corr, annot=True, cmap="coolwarm", vmin=-1, vmax=1)sns.regplot(data=df, x="x", y="y") # scatter + regression line
Figure-Level Functions
Wrappers that support faceting.
- relplot- figure-level wrapper for scatterplot/lineplot
- displot- figure-level wrapper for histplot/kdeplot/ecdfplot
- catplot- figure-level wrapper for box/violin/bar/strip plots
- jointplot- bivariate plot with marginal distributions
- FacetGrid- manually facet data across rows/columns
- sns.set_palette- set a named or custom color palette
Pro Tip
Prefer the figure-level functions (relplot, catplot, displot) over their axes-level counterparts when you need faceting via row=/col= — they return a FacetGrid that handles legends and layout automatically.
Was this cheat sheet helpful?
Explore Topics
#Seaborn#SeabornCheatSheet#DataScience#Beginner#DistributionRelationalPlots#CategoricalPlots#CorrelationPairwisePlots#FigureLevelFunctions#MachineLearning#CheatSheet#SkillVeris
Advertisement
Sri Hayavadhana Info-Tech
Professional Web Designing Services
- Responsive Websites
- E-commerce Solutions
- SEO Friendly Design
- Fast & Secure
- Support & Maintenance