import numpy as np
import matplotlib.pyplot as plt
np.random.seed(0)
mu, sigma = 100, 20#均值和标准差
a = np.random.normal(mu, sigma, size = 100)
plt.hist(a, 20, normed = 1, histtype = 'stepfilled', facecolor = 'b', alpha = 0.75)
plt.title('Histogram')
plt.show()
import numpy as np
import matplotlib.pyplot as plt
np.random.seed(0)
mu, sigma = 100, 20#均值和标准差
a = np.random.normal(mu, sigma, size = 100)
plt.hist(a, 10, normed = 1, histtype = 'stepfilled', facecolor = 'b', alpha = 0.75)
plt.title('Histogram')
plt.show()
import numpy as np
import matplotlib.pyplot as plt
np.random.seed(0)
mu, sigma = 100, 20#均值和标准差
a = np.random.normal(mu, sigma, size = 100)
plt.hist(a, 40, normed = 1, histtype = 'stepfilled', facecolor = 'b', alpha = 0.75)
plt.title('Histogram')
plt.show()
扫码关注“图像处理与模式识别研究所”解锁更多技能呦。