[英]Multiple histograms on same graph with Seaborn `displot` (not `distplot`)
Seaborn distplot
is deprecated. Seaborn
distplot
已弃用。
With distplot
I get the following graph使用
distplot
我得到下图
with this code:使用此代码:
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()
How do I achieve the same with displot
please?请问如何用
displot
达到同样的效果? If I just substitute displot
for distplot
, the histograms are displayed separately.如果我只是将
displot
替换为distplot
,则直方图将单独显示。
Any particular reason you want to use displot?您想使用 displot 有什么特别的原因吗? Using
histplot
accomplishes your goal.使用
histplot
可以实现您的目标。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.