【发布时间】:2021-05-03 14:11:33
【问题描述】:
我正在尝试在我的 kdeplot 中自定义阴影颜色。
我想使用这个调色板,从浅绿色到#3bd6b0 颜色至少有 15 个级别(但以后可能会更多)。为了做到这一点,我像这样使用sns.light_palette:
sns.light_palette('#3bd6b0',15)
但是当我运行这段代码时:
sns.set_palette(sns.light_palette('#3bd6b0', 15))
x = np.random.normal(10, 5, 20)
y = np.random.normal(10, 5, 20)
sns.kdeplot( x=x, y=y, shade=True, shade_lowest=False,cbar=True, thresh= 0.0001, n_levels=15)
我明白了:
这不是我想要的...
我用参数cmap 和palette 尝试了很多东西,但没有任何效果。
你能帮我看看我的代码有什么问题吗?
非常感谢
【问题讨论】:
标签: python seaborn data-visualization