![](/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.