title: Removing the seconds from x-axis time labels in matplotlib
body: <p>I would like to remove seconds from my x-axis labels as they are unnecessary. </p>
  
  <p>Also I want to center align the tick labels instead of have them positioned to the left of the tick mark.</p>
  
  <p>Any suggestions on how to do this?</p>
  
  <p>Here is some of the code that I've used if this helps  </p>
  
  <pre><code>fig=plt.figure()
  ax=fig.add_subplot(111)
  line1 = plot(table.index,table[data],color=colors[0])
  
  fig.autofmt_xdate(rotation=0)   
  
  tickFormat =  matplotlib.ticker.LinearLocator(numticks=5)
  ax.xaxis.set_major_locator(tickFormat)            
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/UpoxR.png" alt="enter image description here"></p>