![](/img/trans.png)
[英]How to plot percentage with seaborn distplot / histplot / displot
[英]Multiple histograms on same graph with Seaborn `displot` (not `distplot`)
Seaborn distplot
已弃用。
使用distplot
我得到下图
使用此代码:
import matplotlib.pyplot as plt
import seaborn as sns
sns.distplot(random.normal(loc=177.8, scale=10.2, size=1000), kde=True)
sns.distplot(random.normal(loc=165.1, scale=8.9, size=1000), kde=True)
plt.show()
请问如何用displot
达到同样的效果? 如果我只是将displot
替换为distplot
,则直方图将单独显示。
您想使用 displot 有什么特别的原因吗? 使用histplot
可以实现您的目标。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.