访问seaborn distplot中的垃圾箱计数 [英] access to bin counts in seaborn distplot
本文介绍了访问seaborn distplot中的垃圾箱计数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在pyplot的 hist()函数中,我们能够访问直方图bin的值(通过返回n
);是否可以从 Seaborn的分布图中访问相同的信息? Seaborn仅返回轴对象.
In pyplot's hist() function, we are able to access the values of the histogram bins (through the return n
); is it possible to access this same information from Seaborn's distplot? Seaborn only returns an axis object.
最终,我想在直方图的顶部并置一个线图,该线图求和bin中的计数.
Ultimately, I'd like juxtapose a line plot on top of the histogram which sums the counts in the bins.
推荐答案
出于完整性考虑,numpy.histogram
是我一直在寻找的东西!
For completeness, numpy.histogram
is what I was looking for!
这篇关于访问seaborn distplot中的垃圾箱计数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文