“Plot Distribusi Python” Kode Jawaban

Plot Python Distribusi Normal

import matplotlib.pyplot as plt
import numpy as np
import scipy.stats as stats
import math

mu = 0
variance = 1
sigma = math.sqrt(variance)
x = np.linspace(mu - 3 * sigma, mu + 3 * sigma, 100)
plt.plot(x, stats.norm.pdf(x, mu, sigma))
plt.show()
Gifted Gull

Plot Distribusi Python

sns.distplot(df['Rating'], hist=True, kde=True, 
             bins=int(15), color = 'darkblue', 
             hist_kws={'edgecolor':'black'},
             kde_kws={'linewidth': 4})
Adventurous Addax

Plot distribusi Seeborn

x = np.random.normal(size=100)
sns.distplot(x);
Proud Penguin

rata -rata = [0,0] kovarians = [[1,0], [0,100]] ds = np.random.multivariate_normal (rata -rata, kovarians, 500) DFrame = PD.DataFrame (DS, kolom = [col1, col2 ]) gbr = sns.kdeplot (dFrame) .get_figure () gbr.safefig ( 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')
Comfortable Cod

Jawaban yang mirip dengan “Plot Distribusi Python”

Pertanyaan yang mirip dengan “Plot Distribusi Python”

Lebih banyak jawaban terkait untuk “Plot Distribusi Python” di Python

Jelajahi jawaban kode populer menurut bahasa

Jelajahi bahasa kode lainnya