title: histogram with time bins from datetime vector
body: <p>I have a vector with dates (datetime) in python. How can I plot a histogram with 15 min bins from the occurrences on this vector? </p>
  
  <p>Here is what I did:</p>
  
  <pre><code>StartTime = []
  for b in myEvents:
      StartTime.append(b['logDate'].time())
  </code></pre>
  
  <p>As you see, I converted the dates into times. (I'm getting myEvents from a mongoDB query)   </p>
  
  <pre><code>fig2 = plt.figure()
  ax = fig2.add_subplot(111)
  ax.grid(True,which='both')
  ax.hist(StartTime,100)
  </code></pre>
  
  <p>The error I get is: </p>
  
  <pre><code>TypeError: can't compare datetime.time to float
  </code></pre>
  
  <p>I understand the error, but I can't figure out how to fix it.</p>
  
  <p>Thank you very much for your help</p>