如何在Seaborn中绘制分布图?
It comes out well in the histplot, but it doesn't draw well in the distplot.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
It comes out well in the histplot, but it doesn't draw well in the distplot.
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(2)
请尝试
sns.displot(data = df,x =“ target”,kde = true)
或
sns.displot(data = df,x =“ target”,kint =“ kde” )
Please try
sns.displot(data=df, x="target", kde=True)
or
sns.displot(data=df, x="target", kind="kde")
您的X值范围是巨大的!
sns.dist()
绘制分布概率意味着总和将等于1。因此,从本质上讲,在您的x值的巨大范围内,您的概率值很小。此图和Y图范围是-1至1。如果您更改Y范围,则应该使您更接近您期望看到的东西。因此,将您的Y量表更改为类似的内容:
Your x range of values is huge!
sns.dist()
plots the distribution probability meaning the sum will equal to 1. So essentially with this huge magnitude of your x values, you'll have very small probability values. This and your y graph range is -1 to 1. If you change your y range, you should get something closer to what you'd expect to see.So change your y scale to something like: