title: Matplotlib labeling x-axis with time stamps, deleting extra 0's in microseconds
body: <p>I am plotting over a period of seconds and have time as the labels on the x-axis. Here is the only way I could get the correct time stamps. However, there are a bunch of zeros on the end. Any idea how to get rid of them??</p>
  
  <pre><code>plt.style.use('seaborn-whitegrid')
  df['timestamp'] = pd.to_datetime(df['timestamp'])
  fig, ax = plt.subplots(figsize=(8,4))
  seconds=MicrosecondLocator(interval=500000)
  myFmt = DateFormatter("%S:%f")
  ax.plot(df['timestamp'], df['vibration(g)_0'],  c='blue')
  ax.xaxis.set_major_locator(seconds)
  ax.xaxis.set_major_formatter(myFmt)
  
  plt.gcf().autofmt_xdate()
  plt.show()
  </code></pre>
  
  <p>This produces this image. Everything looks perfect except for all of the extra zeros. How can I get rid of them while still keeping the 5?</p>
  
  <p><a href="https://i.stack.imgur.com/RoV8o.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/RoV8o.png" alt="enter image description here"></a></p>