x = np.array([dt.datetime(2012, 10, 19, 10, 0, 0), dt.datetime(2012, 10, 19,
    10, 0, 1), dt.datetime(2012, 10, 19, 10, 0, 2), dt.datetime(2012, 10, 
    19, 10, 0, 3)])
y = np.array([1, 3, 4, 2])
fig, (ax1, ax2) = plt.subplots(nrows=2, sharex=True)
ax1.plot(x, y, 'b-')
ax2.plot(x, 1.0 / y, 'r-')
plt.show()
Plotting dates with sharex=True leads to ValueError: ordinal must be >= 1