I am using seaborn to plot the heritability of some brain regions. I want to highlight the labels on the x-axis based on the brain regions. So for example, let's say that I have regions that are White matter and regions that are grey matter. I want to highlight the brain regions of the grey matter in red and the white matter regions in blue. How can I do that?
Here is the code that I use:
b = sns.barplot(x="names", y="h2" ,data=df, ax = ax1)
ax1.set_xticklabels(labels= df['names'].values.ravel(),rotation=90,fontsize=5)
ax1.errorbar(x=list(range (0,165)),y=df['h2'], yerr=df['std'], fmt='none', c= 'b')
plt.tight_layout()
plt.title('heritability of regions ')
plt.show()
What should I add to do what I want? Thanks