【发布时间】:2013-11-24 04:46:11
【问题描述】:
我有一个 1D numpy 数组 h=[h1,h2,h3....hn] 我用这个为权重创建了 x=[1,2,3...n]
代码:
import numpy as np
x=np.arange(len(h))
我想画直方图,不知道怎么画? 谢谢。
这是我的数据:https://www.dropbox.com/s/xx02015pbr484es/Book2.xlsx 我想要这样的东西:
【问题讨论】:
-
在这里查看一些简单的示例 - matplotlib.org/users/pyplot_tutorial.html
-
import matplotlib.pyplot as plt会发生什么;plt.hist(h)?
标签: python numpy matplotlib plot scipy