I'm trying to draw a figure like the one below.
here is the code
x = [0, 1, 2]
y = [88909, 27155, 12897]
plt.bar(x, y, tick_label = ['Pre-K, elementary, and middle',
'Secondary and high', 'Other, ungraded, and n/a or not reported'])
to put a label inside each bar, I could use plt.text
. However, I need to calculate the coordinates for each.
Is there a way to have some kind of lib do it for me, and I just need to provide the strings?