title: Time in x axis matplotlib overlap
body: <p>I plot bitrate in time with following function</p>
  
  <pre><code>#!/usr/bin/python3
  import matplotlib.pyplot as plt
  import datetime
  
  def plotBitrate(time,bitrate,filename):
      time = [datetime.datetime.strptime(elem, '%H:%M:%S.%f') for elem in time]
  
      plt.plot(time,bitrate)
      plt.xlabel('Time')
      plt.ylabel('Bitrate kbits/s')
  
      plt.autofmt_xdate()
      plt.savefig(filename, dpi = 300)
      plt.close()
  </code></pre>
  
  <p>Data looks like this</p>
  
  <pre><code>Time        bitrate
  00:00:00.95 33528.2
  00:00:01.47 30013.2
  00:00:01.99 26238.5
  </code></pre>
  
  <p>But this time format results to overlapping ticks in plot</p>
  
  <p><a href="https://i.stack.imgur.com/MFEbz.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/MFEbz.png" alt="enter image description here"></a></p>
  
  <p>I tried to format the x axis so that it with the plt.autofmt_xdate() but this did not work, I get AttributeError: module 'matplotlib.pyplot' has no attribute 'autofmt_xdate'.</p>
  
  <p>Is it possible to format the x axis so that the ticks don't overlap?</p>
  
  <p>Best regards</p>