plot cumulative distribution function (cdf) in seaborn 1

plot cumulative distribution function (cdf) in seaborn

import numpy as np
import seaborn as sns

x = np.random.randn(200)
kwargs = {'cumulative': True}
sns.distplot(x, hist_kws=kwargs, kde_kws=kwargs)

Here is what the above code is Doing:
1. Generate a random sample of 200 numbers from a normal distribution.
2. Create a dictionary of keyword arguments for the histogram and the KDE.
3. Pass the keyword arguments to the distplot function.

Similar Posts