Seaborn Distribution Plot

  • Post category:Seaborn

In this Seaborn tutorial, you will learn how to plot a Seaborn distribution plot. Seaborn provides a built-in function sns.displot() for this task.

# Import the required modules
import matplotlib.pyplot as plt
import seaborn as sns

# Load the data
df = sns.load_dataset('iris')

# Plot the distribution of the sepal length
sns.displot(df['sepal_length'])

# title
plt.title('Distribution Plot')   

# Show the plot
plt.show()

Output:

Seaborn Distribution Plot

Free resources to learn advanced skills: AiHints and CodeAllow