Reputation: 75
I would like to keep the MEAN value in the plot the same color, and only change the saturation of the bands around the mean value, specifically make it more transparent/lighter. How to achieve that?
Here is an example plot, where I want to keep blue line blue, and the light transparent blue around the line more transparent. (similarly with the orange)
fmri = sns.load_dataset("fmri")
fmri['signal'] = np.abs(fmri['signal'].values)
ax = sns.lineplot(data=fmri, x="timepoint", y="signal", hue="event", style='event')
Upvotes: -1
Views: 105
Reputation: 50143
Using the err_kws
parameter and alpha
. You may need to explore different values.
ax = sns.lineplot(data=fmri, x="timepoint", y="signal",
hue="event", style='event',
err_kws={'alpha': 0.1})
Output:
Upvotes: 2