Seaborn distplot: y axis problems with multiple kdeplots

♀尐吖头ヾ 提交于 2019-12-12 06:18:27

问题


I am currently plotting 3 kernel density estimations together on the same graph. I assume that kdeplots use relative frequency as the y value, however for some of my data the kdeplot has frequencies way above 1.

code I'm using:

sns.distplot(data1, kde_kws={"color": "b", "lw": 1.5, "shade": "False",  "kernel": "gau", "label": "t"}, hist=False)

Does anyone know how I can make sure that the kdeplot either makes y value relative frequency, or allow me to adjust the ymax axis limit automatically to the maximum frequency calculated?


回答1:


Okay so I figured out that I just needed to set the autocaling to Tight, that way it didn't give negative values on the scale.



来源:https://stackoverflow.com/questions/29187495/seaborn-distplot-y-axis-problems-with-multiple-kdeplots

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