title: Plotting a times series using matplotlib with 24 hours on the y-axis
body: <p>If I run the following, it appears to work as expected, but the y-axis is limited to the earliest and latest times in the data. I want it to show midnight to midnight. I thought I could do that with the code that's commented out. But when I uncomment it, I get the correct y-axis, yet nothing plots. Where am I going wrong?</p>
  
  <pre><code>from datetime import datetime
  import matplotlib.pyplot as plt
  
  data = ['2018-01-01 09:28:52', '2018-01-03 13:02:44', '2018-01-03 15:30:27', '2018-01-04 11:55:09']
  x = []
  y = []
  
  for i in range(0, len(data)):
      t = datetime.strptime(data[i], '%Y-%m-%d %H:%M:%S')
      x.append(t.strftime('%Y-%m-%d')) # X-axis = date
      y.append(t.strftime('%H:%M:%S')) # Y-axis = time
  
  plt.plot(x, y, '.')
  # begin = datetime.strptime('00:00:00', '%H:%M:%S').strftime('%H:%M:%S')
  # end   = datetime.strptime('23:59:59', '%H:%M:%S').strftime('%H:%M:%S')
  # plt.ylim(begin, end)
  plt.show()
  </code></pre>
  
  <p>Edit: I also noticed that the x-axis isn't right either. The data skips Jan 2, but I want that on the axis so the data is to scale.</p>
  
  <p>This is a dramatically simplified version of code dealing with over a year's worth of data with over 2,500 entries.</p>