【发布时间】:2015-10-22 00:25:36
【问题描述】:
在 pyplot 的 hist() 函数中,我们可以访问直方图 bin 的值(通过返回 n);是否可以从Seaborn's distplot 访问相同的信息? Seaborn 只返回一个轴对象。
最后,我想在直方图的顶部并列绘制一个线图,用于汇总 bin 中的计数。
【问题讨论】:
-
ax.hist(yourdata)? -
或者更好的是使用
numpy.histogram -
是的,我在看
numpy.histogram,这是 seaborn 在后端调用的内容吗? -
seaborn 只是使用 matplotlib 直方图函数,但我认为这可能在幕后使用 numpy(或者无论如何 numpy 会给出相同的答案)。
标签: python matplotlib histogram seaborn