title: Ticks which exceeds Locator.MAXTICKS
body: <p>I am trying to plot a time-series data by <em>HOUR</em> as shown in the <em>image</em>, but I keep getting this error - <strong>Locator attempting to generate 91897 ticks ([15191.0, ..., 19020.0]), which exceeds Locator.MAXTICKS (1000)</strong>. I have tried all available solutions on <em>StackOverflow</em> for similar problems but still could not get around it, Please help.</p>
  <p>Link to image: <a href="https://drive.google.com/file/d/1b1PNCqVp7W65ciVPEWELiV2cTiXgBu2V/view?usp=sharing" rel="nofollow noreferrer">https://drive.google.com/file/d/1b1PNCqVp7W65ciVPEWELiV2cTiXgBu2V/view?usp=sharing</a></p>
  <p>Link to CSV:
  <a href="https://drive.google.com/file/d/113kYjsqbyL5wx1j204yK6Wmop4wLsqMQ/view?usp=sharing" rel="nofollow noreferrer">https://drive.google.com/file/d/113kYjsqbyL5wx1j204yK6Wmop4wLsqMQ/view?usp=sharing</a></p>
  <p>Attempted codes:</p>
  <pre><code>%matplotlib inline
  import pandas as pd
  import matplotlib.pyplot as plt
  import matplotlib.dates as md
  
  df = pd.read_csv('price.csv', delimiter=',')
  
  plt.rcParams['font.size'] = 18
  
  fig, (ax) = plt.subplots(ncols=1, nrows=1, figsize=(20,15))
  
  # Plot the data
  ax.plot(df.VOLUME, label = 'volume')
  
  # Set the title
  ax.set_title(&quot;AUDUSD Hourly Variation\n&quot;,  fontsize=23)
  
  # Set the Y-Axis label 
  ax.set_ylabel(&quot;\nVolume&quot;)
  
  # Set the X-Axis label
  ax.set_xlabel('\nHour') 
  
  ax.legend()                               # Plot the legend for axes
  
  
  # apply locator and formatter to the ticks on the X axis
  ax.xaxis.set_major_locator(md.HourLocator(interval = 1))    # X axis will be formatted in Hour
  ax.xaxis.set_major_formatter(md.DateFormatter('%H'))      # set the date format to the hour shortname
  
  # Set the limits (range) of the X-Axis
  ax.set_xlim([pd.to_datetime('2011.08.05', format = '%Y.%m.%d'),
               pd.to_datetime('2022.01.28', format = '%Y.%m.%d')])
  
  
  plt.tight_layout()
  
  plt.show()
  
  </code></pre>
  <p>Thanks for your assistance.</p>