title: Plotting times that are too close together
body: <p>My plot has the datetimes bunched together too closely.</p>
  
  <p>I have the following code:</p>
  
  <pre><code>import pandas as pd
  import matplotlib.pyplot as plt
  import matplotlib.dates as md
  import matplotlib.dates as mdates
  
  
  data = {"Date":['2019-2-25 14:24:04', '2019-2-25 14:29:02', '2019-2-20 17:02:14',
                  '2019-3-25 08:12:54', '2019-3-25 12:32:32'],
          "Quiz":[1,2,2,3,4],
          "Score":[10,3,7,4,9]}
  
  df = pd.DataFrame.from_dict(data)
  
  df.Date = pd.to_datetime(df.Date)   
  
  fig = plt.figure(figsize = (11,9))
  ax = fig.add_subplot(111)
  
  ax.set_xticks(df.Date)
  ax.xaxis.set_major_formatter(mdates.DateFormatter('%d/%m/%Y %H:%M'))
  ax.set_xlabel("Date")
  ax.set_ylabel("Score")
  
  ax.plot_date(df.Date, df.Score)
  
  fig.autofmt_xdate(rotation=45)
  plt.show()
  </code></pre>
  
  <p>And here is the plot:</p>
  
  <p><a href="https://i.stack.imgur.com/QYa25.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/QYa25.png" alt="enter image description here"></a></p>
  
  <p>I would like to plot the dates of my data. However, some datetimes are too close together and I haven't been able to figure out a way to space them evenly apart. How can I accomplish this?</p>