我已经安装了最新版本的seaborn(0.11.1)。当我使用自定义颜色绘制历史记录时,它显示的颜色与我预期的不同(请参阅 sns.palplot 的颜色)。对于某些 api,它有一个饱和参数,但对于 displot 则没有。
dat_plots_mod = dat_plots.copy(deep=True)
dat_plots_mod.loc[dat_plots_mod.LDS == "FC", "LDS"] = "F"
palette = ["#9b59b6", "#ff0000", "#00f0f0", "#00ff00", "#000000", "#320ff0"]
sns.set_theme(style="ticks", font_scale=1.3)
g = sns.displot(
x="AgeRS",
hue="LDS",
data=dat_plots_mod,
palette=palette,
aspect=1.5,
)
g.set(ylabel="Number of samples", ylim=(0, 30))
Run Code Online (Sandbox Code Playgroud)
