Matplotlib tutorials: https://matplotlib.org/tutorials/index.html
import numpy as np
import matplotlib.pyplot as plt
x = np.linspace(1, 100, 100)
fig, ax = plt.subplots(1, 1)
ax.plot(x, x**2)
ax.set(xlabel='x', ylabel='x^2',
title='scientific notation')
# scientific notation
from matplotlib import ticker
formatter = ticker.ScalarFormatter(useMathText=True)
formatter.set_scientific(True)
formatter.set_powerlimits((-1,1))
ax.yaxis.set_major_formatter(formatter) # for y axis
ax.xaxis.set_major_formatter(formatter) # for x axis
ax.grid()
fig.savefig("test.png", dpi=300)
plt.show()