title: How to set the xticklabels for date in matplotlib
body: <p>I am trying to plot values from two list. The x axis values are date. Tried these things  so far</p>
  
  <pre><code>year = [20070102,20070806,20091208,20111109,20120816,20140117,20140813]
  yvalues = [-0.5,-0.5,-0.75,-0.75,-0.5,-1.25,-1.25]
  
  dates = [datetime.datetime.strptime(str(int(date)),'%Y%m%d') for date in year]
  
  fig, axes = plt.subplots(1, 1, figsize=(16, 9), dpi=100)
  
  line1, = axes.plot(dates,yvalues, lw=2, marker='*', color='r')
  axes.legend([line1],['VALUES'],loc=1)
  axes.grid()
  axes.set_xlabel('YEAR')
  axes.set_ylabel('VALUES')
  
  yticks = [-2.0,-1.75,-1.5,-1.25,-1.0,-0.75,-0.5,-0.25,0.0]
  axes.set_yticks(yticks)
  axes.set_yticklabels(["$%.2f$" % y for y in yticks]);
  
  axes.set_xticks(dates)
  #axes.set_xticklabels()
  </code></pre>
  
  <p>The figure seems good. But unable to label the x axis ticks correctly.
  I am trying to label x axis with something like 2007-01-02 or 2007 Jan. </p>
  
  <p>Thanks in advance</p>