Histograms need a bin choice; KDEs need a bandwidth. The ECDF needs neither — it plots the exact cumulative proportion of data at or below each value, showing the full distribution with no tuning.
The empirical CDF
sns.ecdfplot(data=penguins, x="flipper_length_mm", hue="species")# y goes 0→1: the fraction of observations ≤ x
Read it directly: the y-value at any x is "what fraction of the data is at most this?". Medians (y=0.5) and percentiles are read straight off, and overlapping groups stay legible.
Rug plots
sns.histplot(data=penguins, x="flipper_length_mm")sns.rugplot(data=penguins, x="flipper_length_mm") # tick per observation on the axis
Key takeaways
- 01sns.ecdfplot shows the cumulative proportion ≤ each value — no bins or bandwidth needed.
- 02Read medians and percentiles straight off the y-axis; overlapping groups stay clear.
- 03sns.rugplot adds a tick per observation along an axis.
- 04ECDF is great for exact, artefact-free distribution comparison.
