Instead of a legend, I want to label just the last bar plot of a stacked bar chart like in the image below:
Intended outcome
I tried the code below, but instead of labelling just the last bar it labelled only the lowest stack across all the bars.
handles, legend_labels = ax.get_legend_handles_labels()
for c, l in zip(ax.containers, legend_labels):
ax.bar_label(ax.containers[-1], labels=legend_labels, label_type='center')