matplotlib直方图

2017-09-10  本文已影响11人  b485c88ab697

matplotlib直方图

x = np.random.normal(size=1000)
plt.hist(x, bins=10)
(array([   4.,   22.,   77.,  172.,  293.,  256.,  123.,   39.,   10.,    4.]),
 array([-3.4162938 , -2.70033058, -1.98436735, -1.26840412, -0.5524409 ,
         0.16352233,  0.87948555,  1.59544878,  2.31141201,  3.02737523,
         3.74333846]),
 <a list of 10 Patch objects>)
上一篇下一篇

猜你喜欢

热点阅读