Skip to main content
Albero Academy

displot & Bivariate

Faceted distributions and two-variable density views.

Distribution Plots8 min

sns.displot is the figure-level distribution function — it wraps histplot/kdeplot/ecdfplot and adds faceting. It also handles bivariate distributions: the joint density of two variables.

Faceted distributions

one distribution per panel
sns.displot(data=penguins, x="flipper_length_mm",
kind="hist", # or "kde", "ecdf"
col="species", # a panel per species
hue="sex")

Two variables at once

bivariate histogram / KDE
sns.displot(data=penguins, x="bill_length_mm", y="bill_depth_mm") # 2-D hist
sns.displot(data=penguins, x="bill_length_mm", y="bill_depth_mm", kind="kde") # 2-D KDE contours

Key takeaways

  1. 01sns.displot is the figure-level distribution function (kind = hist/kde/ecdf).
  2. 02col=/row= facet distributions into comparable panels.
  3. 03Passing both x and y draws a bivariate (2-D) distribution.
  4. 04A 2-D hist is a count heatmap; a 2-D KDE draws density contours.

Finished this chapter?

Mark it complete to track your progress through Seaborn.