美文网首页
matplotlib直方图

matplotlib直方图

作者: b485c88ab697 | 来源:发表于2017-09-10 19:55 被阅读11次

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>)

相关文章

网友评论

      本文标题:matplotlib直方图

      本文链接:https://www.haomeiwen.com/subject/qgytsxtx.html