title: How to set x-axis in every 10 years
body: <p>i have a problem with plot time series data. I want show x-axis in every 10 years but I can only display it every year. Anyone can provide a solution about this??</p>
  
  <pre><code>fig,ax = plt.subplots(figsize=(11,4))
  ax.plot(t, data, '0.1', label ='Data')
  ax.plot(t, df_filt, 'C1', label='Lowpass Filter, cutoff=50 days')
  ax.set_ylabel('Length of Day')
  ax.set_xlabel('Time')
  ax.legend()
  ax.xaxis.set_major_locator(mdates.YearLocator())
  ax.xaxis.set_major_formatter(mdates.DateFormatter('%Y'))
  ax.grid(True)
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/lp3ea.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/lp3ea.png" alt="enter image description here"></a></p>