title: plotting datetime object in matplotlib
body: <p>I have an array of datetime objects that is the following</p>
  
  <pre><code>dates = [datetime.datetime(1900, 1, 1, 10, 8, 14, 565000), datetime.datetime(1900, 1, 1, 10, 8, 35, 330000), datetime.datetime(1900, 1, 1, 10, 8, 43, 358000), datetime.datetime(1900, 1, 1, 10, 8, 52, 808000)]
  </code></pre>
  
  <p>I then tried converting the array to matplotlib suitable objects using <code>dates = plt.dates.date2num(dates)</code></p>
  
  <p>Then I tried to plot it against some values using <code>ax1.plot_date(dates, datac)</code></p>
  
  <p>but received errors as follows:</p>
  
  <pre><code>Exception in Tkinter callback
  Traceback (most recent call last):
    File "C:\Python34\lib\tkinter\__init__.py", line 1487, in __call__
      return self.func(*args)
    File "C:\Python34\lib\site-packages\matplotlib\backends\backend_tkagg.py", line 278, in resize
      self.show()
    File "C:\Python34\lib\site-packages\matplotlib\backends\backend_tkagg.py", line 349, in draw
      FigureCanvasAgg.draw(self)
    File "C:\Python34\lib\site-packages\matplotlib\backends\backend_agg.py", line 461, in draw
      self.figure.draw(self.renderer)
    File "C:\Python34\lib\site-packages\matplotlib\artist.py", line 59, in draw_wrapper
      draw(artist, renderer, *args, **kwargs)
    File "C:\Python34\lib\site-packages\matplotlib\figure.py", line 1079, in draw
      func(*args)
    File "C:\Python34\lib\site-packages\matplotlib\artist.py", line 59, in draw_wrapper
      draw(artist, renderer, *args, **kwargs)
    File "C:\Python34\lib\site-packages\matplotlib\axes\_base.py", line 2092, in draw
      a.draw(renderer)
    File "C:\Python34\lib\site-packages\matplotlib\artist.py", line 59, in draw_wrapper
      draw(artist, renderer, *args, **kwargs)
    File "C:\Python34\lib\site-packages\matplotlib\axis.py", line 1103, in draw
      ticks_to_draw = self._update_ticks(renderer)
    File "C:\Python34\lib\site-packages\matplotlib\axis.py", line 957, in _update_ticks
      tick_tups = [t for t in self.iter_ticks()]
    File "C:\Python34\lib\site-packages\matplotlib\axis.py", line 957, in &lt;listcomp&gt;
      tick_tups = [t for t in self.iter_ticks()]
    File "C:\Python34\lib\site-packages\matplotlib\axis.py", line 905, in iter_ticks
      for i, val in enumerate(majorLocs)]
    File "C:\Python34\lib\site-packages\matplotlib\axis.py", line 905, in &lt;listcomp&gt;
      for i, val in enumerate(majorLocs)]
    File "C:\Python34\lib\site-packages\matplotlib\dates.py", line 580, in __call__
      result = self._formatter(x, pos)
    File "C:\Python34\lib\site-packages\matplotlib\dates.py", line 412, in __call__
      return self.strftime(dt, self.fmt)
    File "C:\Python34\lib\site-packages\matplotlib\dates.py", line 450, in strftime
      s1 = time.strftime(fmt, (year,) + timetuple[1:])
  ValueError: Invalid format string
  </code></pre>
  
  <p>Does anyone have any advice on how to fix this? Thanks in advance!</p>