title: Plotting dates with sharex=True leads to ValueError: ordinal must be >= 1
body: <p>When doing some analysis, I stumbled upon a ValueError and I could boil it down to the following simple example which can reproduce the error I got:</p>
  
  <pre><code>import numpy as np
  import matplotlib.pyplot as plt
  import datetime as dt
  
  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])
  </code></pre>
  
  <p>When trying to plot this simple x and y array, I have no problems with:</p>
  
  <pre><code>fig, ax = plt.subplots()
  ax.plot(x, y)
  </code></pre>
  
  <p>or</p>
  
  <pre><code>fig, (ax1, ax2) = plt.subplots(nrows=2)
  ax1.plot(x, y)
  </code></pre>
  
  <p>but when adding <code>sharex=True</code>, I get an error:</p>
  
  <pre><code>fig, (ax1, ax2) = plt.subplots(nrows=2, sharex=True)
  ax1.plot(x, y)
  </code></pre>
  
  <p>The error message:</p>
  
  <pre><code>Traceback (most recent call last):
    File "C:\Python27\lib\site-packages\matplotlib\backend_bases.py", line 2445, in home
      self._update_view()
    File "C:\Python27\lib\site-packages\matplotlib\backend_bases.py", line 2818, in _update_view
      self.draw()
    File "C:\Python27\lib\site-packages\matplotlib\backend_bases.py", line 2796, in draw
      loc.refresh()
    File "C:\Python27\lib\site-packages\matplotlib\dates.py", line 758, in refresh
      dmin, dmax = self.viewlim_to_dt()
    File "C:\Python27\lib\site-packages\matplotlib\dates.py", line 530, in viewlim_to_dt
      return num2date(vmin, self.tz), num2date(vmax, self.tz)
    File "C:\Python27\lib\site-packages\matplotlib\dates.py", line 289, in num2date
      if not cbook.iterable(x): return _from_ordinalf(x, tz)
    File "C:\Python27\lib\site-packages\matplotlib\dates.py", line 203, in _from_ordinalf
      dt = datetime.datetime.fromordinal(ix)
  ValueError: ordinal must be &gt;= 1
  </code></pre>
  
  <p>I found an issue from matplotlib (<a href="https://github.com/matplotlib/matplotlib/issues/162" rel="noreferrer">https://github.com/matplotlib/matplotlib/issues/162</a>) about the use of <code>twinx</code> with dates giving the same error. Is it the same bug? And it seems a long known bug, but not yet solved.</p>