title: Changing the formatting of a datetime.time axis in matplotlib
body: <p>I am trying to change the formatting of the x-axis into %H:%M, while the xticklabel all became 00:00. The <code>xs</code> looks like follows:</p>
  
  <pre><code>[datetime.time(15, 8, 35), datetime.time(15, 8, 36), datetime.time(15, 8, 37)]
  </code></pre>
  
  <p>I tried with the following script:</p>
  
  <pre><code>import matplotlib.dates as mdate
  import matplotlib.pyplot as plt
  
  dates = ['15:08:35', '15:08:36', '15:08:37']
  xs = [datetime.strptime(d, '%H:%M:%S').time() for d in dates]
  ys = range(len(xs))
  
  plt.gca().xaxis.set_major_formatter(mdate.DateFormatter('%H:%M'))
  plt.gca().xaxis.set_major_locator(mdate.DayLocator())
  
  # Plot
  plt.plot(xs, ys)
  plt.gcf().autofmt_xdate()
  plt.show()
  </code></pre>
  
  <p>And the image looks like this:
  <a href="https://i.stack.imgur.com/2Wxu8.png" rel="nofollow noreferrer">Please click</a></p>
  
  <p>How could I change xticklabel into my desired formatting?</p>