小编aze*_*mar的帖子

如何用不同的颜色填充seaborn.distplot中的区域

是否可以用颜色填充两条阈值线(线1和线2)外部并在y轴上受distplot绘制的KDE曲线限制的区域(在我的应用中为3σ)

import pylab as pl
import seaborn as sns
#plotting the two lines
p1 = pl.axvline(x=line1,color='#EF9A9A')
p2 = pl.axvline(x=line2,color='#EF9A9A')
#plotting the PDF
sns.distplot(stat, hist=True,color='#388E3C')
Run Code Online (Sandbox Code Playgroud)

结果图

python matplotlib seaborn

3
推荐指数
1
解决办法
2301
查看次数

标签 统计

matplotlib ×1

python ×1

seaborn ×1