Hi there:
I tried to plot large numbers and scientific notation has to be used.
But instead of "\times" symbol, it used "e", which cannot be accepted as
publishable. Anyone know how to deal with that?
My original code is:
···
####################################################
import matplotlib.pyplot as plt
import numpy as np
from matplotlib.ticker import ScalarFormatter
# data generation
x = np.arange(1,1e3,20)
y = x**2
formatter = ScalarFormatter()
formatter.set_scientific(True)
formatter.set_powerlimits((-3,3))
fig = plt.figure()
ax = fig.add_subplot(111)
ax.xaxis.set_major_formatter(formatter)
ax.yaxis.set_major_formatter(formatter)
ax.plot(x,y)
plt.show()
####################################################