comment ajouter des étiquettes sur la barre de Barchart Seaborn
# Top 5 crops by year
sns.set_style('white')
fig, axs = plt.subplots(2, 2, figsize=(14, 8))
df_crg[df_crg.year == 2018].groupby('cropName').size().nlargest(5).plot(kind='barh', color='C0', title='2018', ax=axs[0, 0])
df_crg[df_crg.year == 2019].groupby('cropName').size().nlargest(5).plot(kind='barh', color='C1', title='2019', ax=axs[0, 1])
df_crg[df_crg.year == 2020].groupby('cropName').size().nlargest(5).plot(kind='barh', color='C2', title='2020', ax=axs[1, 0])
df_crg[df_crg.year == 2021].groupby('cropName').size().nlargest(5).plot(kind='barh', color='C3', title='2021', ax=axs[1, 1])
for ax in axs.flat:
ax.bar_label(ax.containers[0], fmt='%.0f', label_type='edge', padding=2)
ax.margins(x=0.1)
Martian