---------- Forwarded message ----------
From: Johan Mazel <johan.mazel@...>
Subject: Re: [Matplotlib-users] Plot data with specified time (hour, minute,
To: John Hunter <jdh2358@...>
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.
2008/4/29 John Hunter <jdh2358@...>:
> On Tue, Apr 29, 2008 at 11:38 AM, Johan Mazel <johan.mazel@...>
> > 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
> > 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')