I tried:
plt.title (r'$\omega=%s$' % omega), where omega=-1e-5. The title says:
omega=-1e-05
with the 'e' in italics, and the whole thing generally ugly.
What I'd like to see is what TeX would do for $1 \times 10^{5}$.
I know mpl already can nicely format numbers for axis. Can I somehow use
Have you tried latex_float() as suggested here ?
http://stackoverflow.com/questions/13490292/format-number-using-latex-notation-in-python
def latex_float(f):
float_str = {0:.2g}.format(f)
if e in float_str:
base, exponent = float_str.split(e)
return r{0} \times