---------- Forwarded message ----------
From: Johan Mazel
Subject: Re: [Matplotlib-users] Plot data with specified time (hour, minute, second)
To: John Hunter <firstname.lastname@example.org
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
you can get the date and time into a datetime object as follows:
On Tue, Apr 29, 2008 at 11:38 AM, Johan Mazel <email@example.com
> 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).
dt = datetime.datetime(2008,4,22,3,45,21)
print dt.strftime('%Y-%m-%d %H:%M:%S')