title: Matplotlib plot 24 hours with 1 hour intervals
body: <p>Hi I currently have this plot. Right now this plot shows an interval of 3 hours per ticks. I want to have all hours from 0:00 to 23:59 or back to 0:00 i.e. 00:00, 01:00, 02:00 ... 23:00, 23:59 or 00:00.</p>
  
  <pre><code>import numpy as np
  import matplotlib.pyplot as plt
  import matplotlib.dates as md
  import pandas as pd
  
  df = pd.DataFrame({'toronto_time': ['2018-09-08 00:00:50',
                                      '2018-09-08 01:01:55',
                                      '2018-09-08 05:02:18',
                                      '2018-09-08 07:05:24',
                                      '2018-09-08 16:05:34',
                                      '2018-09-08 23:06:33'], 
                      'description': ['STATS', 'STATS', 'DEV_OL', 'STATS', 'STATS', 'CMD_ERROR']})
  df['toronto_time'] = pd.to_datetime(df['toronto_time'], format='%Y-%m-%d %H:%M:%S')
  
  fig, ax = plt.subplots(figsize=(8,6))
  plt.plot('toronto_time', 'description', data=df)
  ax.set_xlim(df['toronto_time'].min()-pd.Timedelta(1,'h'),
              df['toronto_time'].max()+pd.Timedelta(1,'h'))
  ax.xaxis.set_major_formatter(md.DateFormatter('%H:%M:%S'))
  plt.show()
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/hX6V6.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/hX6V6.png" alt="enter image description here"></a></p>