Seaborn | Distribution Plots

Last Updated : 15 Jun, 2026

Distribution plots in Seaborn are used to visualize how data values are distributed and to understand patterns such as central tendency, spread, and skewness. They help analyze the frequency and probability distribution of numerical data, making it easier to identify trends and outliers.

Types of Distribution Plots

  • Joint Plot: Shows the relationship between two variables along with their individual distributions.
  • Dist Plot: Displays the distribution of a single variable.
  • Pair Plot: Visualizes relationships between multiple variables in a dataset.
  • Rug Plot: Displays individual data points along an axis to show data distribution.

Implementation

1. Import Required Libraries

Python
import seaborn as sns
import matplotlib.pyplot as plt

2. Load the Dataset

The built-in tips dataset is loaded.

Python
df = sns.load_dataset('tips')
df.head()

Output:

output
Dataset

3. Set Plot Style

This sets the background style of the plots to whitegrid, making them easier to read.

Python
sns.set_style("whitegrid")

4. Create a Dist Plot

A Dist Plot displays the distribution of a single variable using a histogram.

  • Shows how values are distributed.
  • Helps identify common value ranges.
  • Useful for understanding data spread.
Python
sns.distplot(df['total_bill'],
             kde=False,
             color='red',
             bins=30)

plt.show()

Output:

displot
Dist Plot

5. Create a Dist Plot with KDE

  • Displays the probability density of the data.
  • Provides a smoother representation than a histogram.
  • Helps identify peaks and patterns in the distribution.
Python
sns.distplot(df['total_bill'],
             kde=True,
             color='blue')

plt.show()

Output:

withKDE
Dist Plot with KDE

6. Create a Joint Plot

  • Examines relationships between variables.
  • Displays both univariate and bivariate distributions.
  • Helps identify trends and correlations.
Python
sns.jointplot(
    x='total_bill',
    y='tip',
    data=df
)

plt.show()

Output:

joint-plot
Joint Plot

7. Create a Pair Plot

A Pair Plot creates scatter plots for every pair of numerical variables.

  • Shows relationships between multiple variables.
  • Displays distributions along the diagonal.
  • Useful for exploratory data analysis.
Python
sns.pairplot(df)

plt.show()

Output:

pairplot
Pairplot

8. Create a Rug Plot

A Rug Plot displays each observation as a small mark on an axis.

  • Shows the exact location of data points.
  • Helps understand data density.
  • Often used together with KDE plots.
Python
sns.rugplot(df['total_bill'])

plt.show()

Output:

rug-plot
Rug Plot

Download full code from here

Comment