You'll want to tweak the string formatting and the offsets to get things centered, maybe use the width from p.get_width(), but that should get you started. May not worked with stacked barplots unless you track the offsets somewhere.