Maybe this will get you going:

import pylab as p
import datetime as d
from matplotlib.dates import DateFormatter
t = [ d.datetime (2007,9,1,12), d.datetime(2007,9,2,12),
d.datetime(2007,9,3,12)
]
t = p.date2num(t)
p.plot_date( t, [10,20,30] )
p.xticks(t)
y = DateFormatter('%Y-%m-%d')
p.gca().xaxis.set_major_formatter(y)
p.draw()

Mark

From: "C M" <[EMAIL PROTECTED]>
> Subject: [Matplotlib-users] basic understanding of plotting dates
>
> x = (2007-09-01 12:00:02, 2007-09-02 12:00:02, 2007-09-03 12:00:02)
> y = (10, 20, 30)
>
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to