How to mark specific bars in barplot with different color and text name in python?

Viewed 79

I am trying to develop a visualization like this image, but unable to mark the specific bars with different colors for Lockdown and unlockdown dates coming from different dataframe.

enter image description here

I used the following code snippet for the barplot.

plt.figure(figsize=(40,20))

sns.set(style='darkgrid')

ax = sns.barplot(x= df_confirmed_transpose.index, y= "India", data=df_confirmed_transpose,alpha=0.8,)

ax.set_xlabel('Daily Confirmed Cases "India"', fontsize=80)

ax.set_ylabel('Number of Cases', fontsize=80)

labels = df_confirmed_transpose.index

Can anyone help me with some code snippets for marking and putting text on it?

0 Answers
Related