0

I'm trying to add an annotate to my bar plot.

Data:

df.q11.value_counts().plot(kind='bar)

1    78

0    22

Name: q11, dtype: int64
  • using seaborn countplot

    sns.countplot(x='q11',data=df)
    

I didn't find any annotate in the Documentation.

countplot

I try to add for loop using plt.text but with no success

for I in range(len(df.q11.unique())):
    plt.text(i,y[I],ha='center',va='bottom')

plt.show()
Adarsh Wase
  • 1,508
  • 3
  • 8
  • 24
motabtw
  • 13
  • 1
  • 2
  • Do you mean [this](https://stackoverflow.com/questions/59461033/seaborn-how-to-show-values-in-a-countplot)? – Peter Nov 15 '21 at 08:59

0 Answers0