title: Using matplotlib to plot a distribution of time occurrences. I would like the x axis to have hours (12:00 PM) rather than integers (12)
body: <p><a href="https://i.imgur.com/U9brxGG.png" rel="nofollow noreferrer">Here's</a> my plot, which is generated using the following code:</p>
  
  <pre><code>bins = np.linspace(0,24,25)
  plt.hist(hours,bins, edgecolor='black', linewidth = 1.2, color = 'red')
  </code></pre>
  
  <p>I would like the x axis to show 24 entries, from 12:00AM to 11:00 PM ideally rotated left 90 degrees.</p>
  
  <p>I see two paths: convert the actual data to time values so the histogram reads in time values or simply add a custom x axis with 12:00AM, 1:00 AM, etc. What's the easiest / cleanest approach here? I'm not familiar with how to do either. For reference, "hours" is a int64 array.</p>