0

I am trying to figure out to add transparency or alpha to sns.pointplot. I have a plot that looks like this:

Overlapping horizontal errorbars

I am trying to add the transparency or alpha to it, but no luck. I know I can set alpha in sns.kdeplot but not sure how to do it on sns.pointplot.

plt.rcParams['figure.autolayout'] = True
fig, ax = plt.subplots()
q1 = sns.pointplot(df1['Q53Val'][0:191], color='#22b584', dodge = True, errwidth=50, scale = 7.5, plot_kws=dict(alpha=0.3)).set(xlim=0)
q2 = sns.pointplot(df1['Q53Val'][192:], color='#f77f2f', dodge = True , errwidth=50, scale = 7.5, plot_kws=dict(alpha=0.3)).set(xlim=0)
ax.set(ylabel=None)
ax.set(xlabel=None)
ax.spines["top"].set_visible(False)
ax.spines["right"].set_visible(False)
ax.spines["bottom"].set_visible(False)
ax.spines["left"].set_visible(False)
plt.xticks([0, 0.2, 0.4, 0.6, 0.8, 1.0])
plt.xticks([])
plt.yticks([])
tdy
  • 36,675
  • 19
  • 86
  • 83
sP1999
  • 3
  • 3
  • Does this question work for you? https://stackoverflow.com/questions/47200033/how-to-adjust-transparency-alpha-in-seaborn-pairplot [alpha](https://stackoverflow.com/questions/47200033/how-to-adjust-transparency-alpha-in-seaborn-pairplot) – Jewel_R Nov 30 '22 at 02:05
  • Hey, Sorry for the fusion. I am referring to sns.pointplot but I tried using alpha but it did not work – sP1999 Nov 30 '22 at 02:12
  • Seaborn uses alpha for the error bands, it doesn't support alpha for the main lines nor the markers. – JohanC Nov 30 '22 at 16:53

0 Answers0