I'm trying to change the output of an exponential string formatting. I've fitted a curve to some data and would like to write these into the plot. Problem is, the x e-y format doesn't look nice, is there a posibility to change it so x * 10^-y?
Here is an example of the code I'm working with:
plt.plot(x, y, 'x', label = '$f(t) = {a:.0f} \cdot x + {b:.2e}$'.format(a = para[0], b = para[1])
a is some number bigger than 10000, that's why there is no need for decimalnumbers, but b is around 10^-7. Writing it as a float is spacewasting for the leading 0s, but the e^-7 doesn't look nice for publishing, that why I would like to change the output of the e-formatter, so it gives \cdot 10^{-7} (the \cdot {} for LaTeX) back.
Thanks