Skip to content
Advertisement

How to get rid of scientific notation on bar labels in matplotlib?

How could I format the bar labels to remove the scientific notation?

JavaScript

barplot

Advertisement

Answer

As already suggested by BigBen in the comment, you can pass fmt parameter to matplotlib.axes.Axes.bar_label; you can use %d for integers:

JavaScript

enter image description here

User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement