简体   繁体   English

Seaborn distplot:具有多个kdeplots的y轴问题

[英]Seaborn distplot: y axis problems with multiple kdeplots

I am currently plotting 3 kernel density estimations together on the same graph. 我目前正在同一张图上绘制3个内核密度估计值。 I assume that kdeplots use relative frequency as the y value, however for some of my data the kdeplot has frequencies way above 1. 我假设kdeplots使用相对频率作为y值,但是对于我的某些数据,kdeplot的频率远高于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? 有谁知道我如何确保kdeplot使y值成为相对频率,或者让我自动将ymax轴限制调整为计算出的最大频率?

好的,所以我发现我只需要将autocaling设置为Tight ,这样就不会在比例尺上给出负值。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM