So I have this horizontal barplot and I want to highlight certain labels (or keywords) with other colors.
This is my horizontal barplot:
I want to make the keyword 'nature' and 'panorama' to be red color. I tried this code but it doesn't work:
f, ax = plt.subplots(figsize=(15,15))
plt.autoscale(enable=True, axis='y', tight=True) # tight layout
plt.barh(df['keywords'], df['number']) # base barplot with blue color
plt.barh(df[df['keywords']=='nature'], df['number'], color='red') # overlay barplot with red color
plt.barh(df[df['keywords']=='panorama'], df['number'], color='red') # overlay barplot with red color
ax.tick_params(labelsize=18)
plt.title('Difference average of cluster 3')