I need to annotate horizontal bar graphs. I am able to annotate vertical bar graphs using the example shown in matplotlib website but a similar idea for horizonatl doesn\'t
def autolabel(rects): for rect in rects: width = rect.get_width() plt.text(1.05*rect.get_width(), rect.get_y()+0.5*rect.get_height(), '%d' % int(width), ha='center', va='center')