I spent some time finding the answer to my question, so I think the new question is in order. Consider this plot:

Axis labels use scientific notation. On the Y axis, everything is fine. However, I tried and could not get rid of the scaling factor that Python added in the lower right corner. I would like to either completely remove this factor, or simply indicate it with units in the axis header or multiply them by each tick mark. Everything will look better than this ugly 1e14 .
Here is the code:
import numpy as np data_a = np.loadtxt('exercise_2a.txt') import matplotlib as mpl font = {'family' : 'serif', 'size' : 12} mpl.rc('font', **font) import matplotlib.pyplot as plt fig = plt.figure() subplot = fig.add_subplot(1,1,1) subplot.plot(data_a[:,0], data_a[:,1], label='$T(t)$', linewidth=2) subplot.set_yscale('log') subplot.set_xlabel("$t[10^{14}s]$",fontsize=14) subplot.set_ylabel("$T\,[K]$",fontsize=14) plt.xlim(right=max(data_a [:,0])) plt.legend(loc='upper right') plt.savefig('T(t).pdf', bbox_inches='tight')
Update: incorporating the implementation of scientificNotation in my script, the graph now looks like

Much nicer if you ask me. Here is the complete code for those who want to accept part of it:
import numpy as np data = np.loadtxt('file.txt') import matplotlib as mpl font = {'family' : 'serif', 'size' : 16} mpl.rc('font', **font) import matplotlib.pyplot as plt fig = plt.figure() subplot = fig.add_subplot(1,1,1) subplot.plot(data[:,0], data[:,1], label='$T(t)$', linewidth=2) subplot.set_yscale('log') subplot.set_xlabel("$t[s]$",fontsize=20) subplot.set_ylabel("$T\,[K]$",fontsize=20) plt.xlim(right=max(data [:,0])) plt.legend(loc='upper right') def scientificNotation(value): if value == 0: return '0' else: e = np.log10(np.abs(value)) m = np.sign(value) * 10 ** (e - int(e)) return r'${:.0f} \cdot 10^{{{:d}}}$'.format(m, int(e)) formatter = mpl.ticker.FuncFormatter(lambda x, p: scientificNotation(x)) plt.gca().xaxis.set_major_formatter(formatter) plt.savefig('T(t).pdf', bbox_inches='tight', transparent=True)