1

Evening all,

I'm trying to use Matplotlib to plot a graph of dates relative to time. The time is in hours, minutes, seconds; the date is in day, month, year.

times = ['10:11:30','02:04:09','07:55:10']
dates = ['01/11/2013','02/11/2013','03/11/2013']

Ideally I would like the chart to show dates along the bottom in dd/mm/yyyy format, and time along the y axis as HH:MM.

Now, I have spent many hours reading and coding to try to produce this chart but have been unable to do so. I won't bore you with the details of my failed attempts but I would really appreciate if someone could show me how to do this.

Kelly.

benten
  • 1,995
  • 2
  • 23
  • 38
Phoenix
  • 4,386
  • 10
  • 40
  • 55
  • Also, just a note on the question I pointed to as a duplicate: Currently, matplotlib uses a float-based array for datetimes, where a difference of 1.0 corresponds to 1 day. Now that numpy has built-in datetime array support, there are other common conventions for (non-object) arrays of datetimes. That answer assumes that you're using the internal matplotlib representation. If need to use a different representation, that should point you in the right direction. (Or you can just convert.) – Joe Kington Nov 04 '13 at 19:32

0 Answers0