title: Change date labels when plotting pandas series with matplotlib
body: <p>I have a time series of monthly data like this, and plot it like this:</p>
  
  <pre><code>rng = pd.date_range('1965-01-01', periods=600, freq='M')
  ts = pd.Series(np.random.randn(len(rng)), index=rng)
  fig, ax = plt.subplots()
  ts.plot(ax=ax)
  </code></pre>
  
  <p>The major tick marks are set every 10 years, beginning in 1969. I'd like to change this so they start in 1975. After looking at some matplotlib samples (<a href="http://matplotlib.org/examples/api/date_demo.html" rel="nofollow">here</a> and <a href="http://matplotlib.org/examples/pylab_examples/date_demo2.html" rel="nofollow">here</a>) I tried adding</p>
  
  <pre><code>from matplotlib.dates import YearLocator, DateFormatter
  decs = YearLocator(10)   # decades
  decsFmt = DateFormatter("%Y")
  
  ax.xaxis.set_major_locator(decs)
  ax.xaxis.set_major_formatter(decsFmt)
  
  datemin = pd.datetime(ts.index.min().year, 1, 1)
  datemax = pd.date(ts.index.max().year + 1, 1, 1)
  ax.set_xlim(datemin, datemax)
  </code></pre>
  
  <p>but this doesn't work.</p>