When work with matplotlib inline backend in ipython notebook, the default behavior is using bbox_inches=\'tight\' to generate the embedded png image internally via savefig()
You may use pyplot.subplots
to align the plots in a grid order, so the figures will be visually aligned in notebook (if that's what you want?)
Something like this:
%matplotlib inline
import matplotlib.pyplot as plt
import numpy as np
d1 = np.random.rand(100)
d2 = np.random.rand(100)*10000
fig, (ax1, ax2) = plt.subplots(nrows=2, ncols=1)
plt.subplots_adjust(left=0.2)
ax1.plot(d1)
ax2.plot(d2)
As OP's requirements to use separate plots rather than subplots, here is a hacky solution. This is working on my Notebook, more details about the customization can be found HERE.
import matplotlib.pyplot as plt
import numpy as np
%matplotlib inline
# to override ytick.major.width before any plot
plt.rcParams['ytick.major.pad'] = 20
plt.plot(np.random.rand(100))
# another override to set alignment for the plot
plt.rcParams['ytick.major.pad'] = 5
plt.figure()
plt.plot(np.random.rand(100)*10000)
# plt.rcdefaults() will reset everything to defaults as the doc says.
Not the most elegant way but it's working as required.