On 9/4/07, Brendan Barnwell <[EMAIL PROTECTED]> wrote:

>         Incidentally, is there a reason why matplotlib can't just handle 
> datetime
> objects itself?  The requirement of having to manually convert them to an 
> ad-hoc
> matplotlib "format" (which is just an integer) seems rather obtuse.

It can handle native datetime objects, as of recent versions, but it
is not trivial.  The original versions of matplotlib assumed you were
passing in floating point (not integer) sequences (matplotlib was
written before python had a datetime object by the way, and we
supported conversion from mx datetime objects).  So we supplied some
conversion functions to convert mx dates or python datetimes to
floating point numbers so matplotlib could handle them like all other
numbers, and used custom tick locators and tick formatters decorate
the date axes.

More recent versions of matplotlib support plotting with custom (non
scalar) types via a conversion registry, so you can do the obvious
thing with native datetime objects.

JDH

-------------------------------------------------------------------------
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