title: mpld3 does not display dates on x axis correctly
body: <p>I am plotting a large dataset from a database using matplotlib and I use mpld3 to pass the figure to the browser. On the x-axis there are dates. The issue here is that while plotting without the mpld3 works perfect, when I use it, the dates don't appear correctly.</p>
  
  <p>Here is my code:</p>
  
  <pre><code>date1 = '2015-04-22 20:28:50'
  date2 = '2015-04-23 19:42:09'
  
  db = Base('monitor').open()
  result_set = db.select(['MeanVoltage','time'],"time&gt;=start and time&lt;=stop",  start=date1, stop=date2)
  
  V = [float(record.MeanVoltage) for record in result_set if record != 0]
  Date = [str(record.time) for record in result_set]
  
  
  dates = [datetime.datetime.strptime(record, '%Y-%m-%d %H:%M:%S') for record in Date]
  dates = matplotlib.dates.date2num(dates)
  
  fig, ax = plt.subplots()
  plt.gca().xaxis.set_major_formatter(mdates.DateFormatter('%m/%d/%Y %H:%M:%S' ))
  
  plt.gcf().autofmt_xdate()
  ax.plot(dates,V)
  #mpld3.fig_to_html(fig)
  #mpld3.show(fig)
  plt.show()
  </code></pre>
  
  <p>that shows the plot perfectly like this:
  <img src="https://i.stack.imgur.com/hv3uD.png" alt="first figure">. </p>
  
  <p>Now, if I comment out this line only:</p>
  
  <pre><code>plt.show()
  </code></pre>
  
  <p>and uncomment these two:</p>
  
  <pre><code>mpld3.fig_to_html(fig)
  mpld3.show(fig)
  </code></pre>
  
  <p>the figure appears in the browser like this: 
  <img src="https://i.stack.imgur.com/HYjgB.png" alt="second figure"></p>
  
  <p>As you can see, the only issue is how the dates appear in the x-axis.
  Is there any way to overcome it?</p>