Function to add labels with the values to the bars in a bar chart

Had a hard time looking how to easily add text to the bars with the values of each.
Also wanted it to work with both vertical and horizontal bars.

Created a function where you pass the axes and it adds the values as text to the bars.

Github link to addLabels2Chart.ipynb notebook

1 Like