How to Automatically Extract and Label Data Points on a Seaborn KDE Plot

Lee Vaughan
Towards Data Science
8 min readSep 5, 2023

--

DALL·E 2023— An impressionist painting of an undulating mountain range with brightly colored circles along the ridgeline (all remaining images by the author).

A Kernel Density Estimate plot is a method — similar to a histogram — for visualizing the distribution of data points. While a histogram bins and counts observations, a KDE plot smooths the observations using a Gaussian kernel. As alternatives to histograms, KDEs are arguably more attractive, easier to compare in the same figure, and better at accentuating patterns…

--

--

Author of “Python Tools for Scientists,” “Impractical Python Projects,” and “Real World Python.” Former Senior Principal Scientist for ExxonMobil.