Seaborn : How to get the count in y axis for distplot using PairGrid

让人想犯罪 __ 提交于 2020-02-02 10:54:59

问题


I'm using PairGrid but I don't understand what does y axis means for distplot. I thought it represents a count. But it's starting from negative values in the pairgrid. If I make only the distplot, I'm getting the count.

I don't know if it's clear so, there's some plots :

My PairGrid:

My distplot :

The distplot is the same as the plot in the top left corner of the PairGrid.

The code corresponding to this is :

sns.distplot(pd.DataFrame(mySerie), kde=False)

and for the PairGrid :

g = sns.PairGrid(myDataFrame)
g = g.map_diag(sns.distplot, kde=False)
g = g.map_offdiag(plt.scatter)

Thank you in advance


回答1:


It was understanding (although I could be mistaken) that the y-axis in your histograms is the fraction of the total counts. For example, in my distplot, roughly 0.08 or 8% of rows are in the 0-5 bin My Distplot



来源:https://stackoverflow.com/questions/50525473/seaborn-how-to-get-the-count-in-y-axis-for-distplot-using-pairgrid

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!