distplot seaborn example
Example 1: distribution seaborn
x = np.random.normal(size=100)
sns.distplot(x);
Example 2: seaborn.distplot()
>>> import seaborn as sns, numpy as np
>>> sns.set_theme(); np.random.seed(0)
>>> x = np.random.randn(100)
>>> ax = sns.distplot(x)
Example 3: mean =[0,0] covariance = [[1,0],[0,100]] ds = np.random.multivariate_normal(mean,covariance,500) dframe = pd.DataFrame(ds, columns=['col1', 'col2']) fig = sns.kdeplot(dframe).get_figure() fig.savefig('kde1.png')
mean =[0,0]
covariance = [[1,0],[0,100]]
ds = np.random.multivariate_normal(mean,covariance,500)
dframe = pd.DataFrame(ds, columns=['col1', 'col2'])
fig = sns.kdeplot(dframe).get_figure()
fig.savefig('kde1.png')
Example 4: kde = false
kdebool, optional
Whether to plot a gaussian kernel density estimate.