I've plotted the following graph:

but I want the 1e-4 to be something like LaTex formatting, and to be along the side. I've tried using
ax.yaxis.set_major_formatter(mpl.ticker.ScalarFormatter(useMathText=True, useOffset=True))
and
ax.yaxis.get_major_formatter().set_powerlimits((0,1)) separately, but they don't give the desired effect.
How can I make the y-axis look more "publishable"?