What is the syntax for preventing scientific notation in matplotlib?

536 Views Asked by At

I wrote the following code to create a bar plot:

ords_prods_merge['order_dow'].value_counts().plot.bar()

The output is a barchart which shows e.g. le6 at the y axis. I want "normal" numbers there, e.g. 6000000.

Can I write something into my line of code to make that happen?

Thanks!

1

There are 1 best solutions below

0
On BEST ANSWER
from matplotlib import pyplot as plt
plt.bar(ords_prods_merge['order_dow'].value_counts())
plt.ticklabel_format(style='plain')    # prevents scientific notation
plt.show()