---------- Forwarded message ----------
From: Johan Mazel <[EMAIL PROTECTED]>
Date: 2008/4/29
Subject: Re: [Matplotlib-users] Plot data with specified time (hour, minute,
second)
To: John Hunter <[EMAIL PROTECTED]>


When you wrote "import matplotlib.ticker", you meant "from matplotlib.dates
import ticker" ?

I think I have a bug or something because I get an error like "ValueError:
setting an array element with a sequence." with a lot of debug stuff from
python and MatPlotLib
The line concerned is the one where I do plot(datetime_list,data_list).
It's very strange because just before I use "my_datetime.strftime("%d %H %M
%S")" with my_datetime as an element of my list and it works perfectly.

Anyway, thanks a lot for the help.
Johan Mazel



2008/4/29 John Hunter <[EMAIL PROTECTED]>:

> On Tue, Apr 29, 2008 at 11:38 AM, Johan Mazel <[EMAIL PROTECTED]>
> wrote:
> > Ok.
> > I manage to get either time or date but not both inside the same object
> .
> > And I don't know how to use plot with two object (one for the time and
> the
> > other for the date).
>
> you can get the date and time into a datetime object as follows:
>
> import datetime
> dt = datetime.datetime(2008,4,22,3,45,21)
> print dt.strftime('%Y-%m-%d %H:%M:%S')
>
-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to