I am trying to show the numbers at x and y axis in scientific notation but it does not work.

Can anyone help me.

Thank you in advance.

Here is the code and fs is 60 000 000.

from matplotlib.ticker import ScalarFormatter

formatter = ScalarFormatter(useMathText=True)

formatter.set_scientific(True)

formatter.set_powerlimits((-1,3))

fig1 = plt.figure()

ax1 = fig1.gca(projection=‘3d’, azim=0)

ax1.xaxis.set_major_formatter(formatter)

ax1.yaxis.set_major_formatter(formatter)

tau_val, freq_val = npy.meshgrid(npy.float64(tau_val)/fs, npy.float64(freq_val)*fs)

ax1.plot_surface(tau_val, freq_val, caf, rstride=1, cstride=1, cmap=cm.jet, linewidth=0, antialiased=False)

plt.show()