Distribution (Dist.) Plots in Python (Seaborn)

Hoda Saiful
2 min readDec 8, 2020

A distribution plot is a combination of Histogram, Kernel Density Estimate (KDE) & Rug Plot, all in one single frame !

Dataset

The dataset is available as a part of Seaborn library.

It contains the data from a restaurant. It has 7 columns that capture the total_bill, tip rendered, sex of the person rendering the tip, if the person was a smoker, day of the week, time of the day and size of the table.

Plot using Seaborn library

A distribution plot comprises of 3 plots each of which may be toggled ON or OFF. By default, Histogram and KDE are set to ON , whereas RUG Plot is set to OFF .

The KDE or histogram may be turned OFF by specifying kde=False or hist=False argument respectively. Likewise, RUG plot can be turned ON, using rug=True argument

Individual plots within a Distribution plot can be further customized. The custom parameters are specified as a dictionary — key:value pair. In the below example, we’ve the 3 plots set to ON.

--

--