title: Reformat matplotlib x-axis from HH:MM:SS to HH:SS
body: <p>I have datapoints for every minute of a day:</p>
  
  <pre><code>import numpy as np
  data = np.random.random(1440,)
  
  # I can represent minutes as integers:
  
  mins = np.arange(1440,dtype=np.int)
  
  # convert to datetime
  
  import datetime
  times=np.array([datetime.datetime(2014, 5, 13, int(p/60), p%60) for p in mins])
  
  # and plot for every 20 samples:
  
  import matplotlib.pyplot as plt
  plt.plot(times[1::20], data[1::20])
  </code></pre>
  
  <p>Gives me:</p>
  
  <p><img src="https://i.stack.imgur.com/6nLBC.png" alt="enter image description here"></p>
  
  <p><strong>How can I change the x-axis formating to HH:MM?</strong></p>
  
  <p>I've tried useing the <code>datetime.time()</code> function instead of <code>datetime.datetime()</code> however this results in error.</p>