Change x axes scale

Try using matplotlib.pyplot.ticklabel_format:

import matplotlib.pyplot as plt
...
plt.ticklabel_format(style="sci", axis="x", scilimits=(0,0))

This applies scientific notation (i.e. a x 10^b) to your x-axis tickmarks

Leave a Comment