简体   繁体   English

Seaborn displot - 当绘图具有直方图和 KDE 时,是否可以将 y 轴设置为显示密度

[英]Seaborn displot - Can the y axis be set to show density when plot has histogram and KDE

Hi I am new to using Jupyter notebooks, python, matplotlib, pandas & seaborn.嗨,我刚开始使用 Jupyter 笔记本、python、matplotlib、pandas 和 seaborn。 I am trying to plot a density plot using the displot function in seaborn.我正在尝试使用 seaborn 中的 displot 函数绘制密度图。 I want to be able to see the histogram aswell but instead of "count" on the y axis I want to see the density.我也希望能够看到直方图,但我想查看密度而不是 y 轴上的“计数”。 The old distplot function automatically shows density I just don't know how to set it with the new displot.旧的 distplot 函数会自动显示密度我只是不知道如何使用新的 displot 设置它。 Any help would be greatly appreciated!任何帮助将不胜感激!

在此处输入图片说明

我要回答我自己的问题... stat="密度" 示例:sns.displot(data=df_under_100, x="processingtime_wks", stat="密度", binwidth=5, binrange=(0.0, 100.0), kde=真)

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

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