title: Matplotlib RuntimeError: exceeds Locator.MAXTICKS when using MultipleLocator
body: <p>I am plotting a Matplotlib chart with 10000 x axis data points. To avoid the X axis labels overlapping, I have used a Major MultipleLocator of 40 and a minor MultipleLocator of 10. This code works for 1000 data points. </p>
  
  <pre><code>from matplotlib import pyplot as plt
  import numpy as np
  import matplotlib.ticker as mticker
  
  ##generating 1000 data points
  years = [i for i in range(1,10000)]
  data = np.random.rand(len(years))
  
  fig, ax = plt.subplots(figsize = (18,6))
  
  ind = np.arange(len(data))
  
  bars1 = ax.bar(ind, data, 
          label='Data')
  
  ax.set_title("Data vs Year")
  
  #Format Y Axis
  ax.set_ylabel("Data")
  ax.set_ylim((0,1))
  
  #Format X Axis
  ax.set_xticks(range(0,len(ind)))
  ax.set_xticklabels(years)
  ax.set_xlabel("Years")
  ax.xaxis.set_major_locator(mticker.MultipleLocator(40))
  ax.xaxis.set_major_formatter(mticker.FormatStrFormatter('%d'))
  
  ax.xaxis.set_minor_locator(mticker.MultipleLocator(10))
  fig.autofmt_xdate()
  ax.xaxis_date()
  plt.tight_layout()
  
  plt.show()
  </code></pre>
  
  <p>This above chart produces the following error.</p>
  
  <pre><code>RuntimeError: Locator attempting to generate 1102 ticks from -510.0 to 10500.0: exceeds Locator.MAXTICKS
  </code></pre>
  
  <p>Can you please tell me the error in this chart?</p>