Add unit to yaxis labels in MatPlotLib

Viewed 10977

I am trying to add mi or km (miles, kilometers) after the value on the yaxis of a matplotlib bar chart.

Right now I am just supplying matplotlib the values and it is making the yaxis labels automatically. I can't figure out how to append mi to the end of a value.

24 > 24 mi

There is an option for ax.set_7ticklabels(), but then I would need to set them statically.

1 Answers
Related