How to build a basic density chart with Python and Seaborn.

Basic density plot with seaborn

# libraries & dataset
import seaborn as sns
import matplotlib.pyplot as plt
  
sns.set_theme(style="darkgrid")
df = sns.load_dataset('iris')
 
# Make default density plot
sns.kdeplot(df['sepal_width'])
plt.show()

Cumulative density plot

Basic density plot with seaborn: Cumulative density plot

# libraries & dataset
import seaborn as sns
import matplotlib.pyplot as plt
  
sns.set_theme(style="darkgrid")
df = sns.load_dataset('iris')
 
# Make default density plot
sns.kdeplot(df['sepal_width'], cumulative=True)
plt.show()