The correct way of doing this, is by using the clip keyword instead of range:sns.distplot(arr, hist=False, kde_kws={'clip': (0.0, 1.0)})这将产生:确实,如果你只关心 kde 而不是直方图,你可以使用 kdeplot 函数,它会产生相同的结果:Indeed, if you only care about the kde and not the histogram, you can use the kdeplot function, which will produce the same result:sns.kdeplot(arr, clip=(0.0, 1.0)) 这篇关于在seaborn distplot KDE估计中限制x的范围的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云!
09-01 23:52