【发布时间】:2014-07-01 07:48:14
【问题描述】:
我正在使用 matplotlib 创建一个直方图(未标准化)。 我想得到每个垃圾箱的确切大小。也就是说,不是宽度而是长度。 换句话说,每个 bin 中包含的数据数。 有什么建议吗???
【问题讨论】:
-
这是直方图返回的东西之一
bin_vals, bin_edges, patchs = np.hist(...)
标签: python matplotlib
我正在使用 matplotlib 创建一个直方图(未标准化)。 我想得到每个垃圾箱的确切大小。也就是说,不是宽度而是长度。 换句话说,每个 bin 中包含的数据数。 有什么建议吗???
【问题讨论】:
bin_vals, bin_edges, patchs = np.hist(...)
标签: python matplotlib
使用 numpy 函数 histogram,它返回包含 bin 位置和大小的数组。
【讨论】: