0
votes

I am using Python and Matplotlib to chart some time-series data. The data series looks like this:

2015-08-04 06:00:09,803 INFO 53.0
2015-08-04 06:00:14,802 INFO 51.7
2015-08-04 06:00:19,808 INFO 52.6
2015-08-04 06:00:24,808 INFO 52.5
2015-08-04 06:00:29,806 INFO 51.5
...

Conversion of the date portion using date2num results in a series of float values which look like this:

735814.2501041667
735814.2501620371
735814.2502199074
735814.2502777778
735814.2503356482
...

If I then plot these date/time values on the x-axis, I get a series of numbers that don't resemble dates or times. I must be missing something obvious with formatting the dates but can't seem figure out what it is. Ideas?

1
Are u ok with a pandas solution? - Kirubaharan J
Sure, don't know much about Pandas though... - Mark Morey

1 Answers

0
votes

use the DateFormatter and related functions to choose how to display your dates. http://matplotlib.org/examples/api/date_demo.html