my code:
import seaborn as sns
import matplotlib.pyplot as plt
import numpy as np
plot_df = pd.DataFrame({"total":[30], "matches":[16],"mismatches":[7]})
p = sns.catplot(data=plot_df, kind="bar")
for index, row in df.iterrows():
p.text(row.name,row.total.row.matches,row.mismatches, color='black', ha="center")
plt.show()
I trying follow this solution: Seaborn Barplot - Displaying Values
But in my case I get a error:
AttributeError: 'FacetGrid' object has no attribute 'text'
What's wrong?