for p in ax.patches:
values= '{:.0f}'.format(p.get_height())
x = p.get_x() + p.get_width()/2
y = p.get_height()
ax.annotate(values, (x, y),ha='center', va ='bottom', fontsize = 11)
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter