title: Matplotlib x axis date tick frequency
body: <p>I have a simple dataframe that looks something like this (Year is the datetime index column):</p>
  
  <pre><code>Year         A          B
  2018-01-01  1.049400    1.034076    
  2017-01-01  1.056371    1.032066    
  2016-01-01  1.063413    1.030055 
  </code></pre>
  
  <p>I graph the data using: </p>
  
  <p><code>df['A'].plot()</code></p>
  
  <p><code>df['B'].plot()</code></p>
  
  <p>And get this graph with date tick labels every 5 years.</p>
  
  <p><a href="https://i.stack.imgur.com/CroAq.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/CroAq.png" alt="enter image description here"></a></p>
  
  <p>How can I make the year ticks appear every 2 (or any other number) of years?</p>