【发布时间】:2018-11-30 19:11:11
【问题描述】:
给定一个简单的负值列表:l = [0, -1, -1, -1, -10, -100]
使用标准方法 plt.hist(l) 可视化其直方图的最快方法是什么?
我希望能够查看列表中的所有个条目及其相对频率。
在做:
from matplotlib import pyplot as plt
l = [0, -1, -1, -1, -10, -100]
plt.hist(l)
plt.show()
结果:
在当前情况下设置垃圾箱数量的正确方法是什么?
高度赞赏的任何帮助
【问题讨论】:
-
使用
bins参数?
标签: python matplotlib histogram