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).
Thanks for the answer.
Johan Mazel


2008/4/29 John Hunter <jdh2358@gmail.com>:
On Tue, Apr 29, 2008 at 8:12 AM, Johan Mazel <johan.mazel@gmail.com> wrote:

> I also would like to know wether I can use the same type of functionnality
> as in Gnuplot where you can specify the format of data in input and the data
> displayed of the x axis. I just guess that the use of the date object
> replace any kind of setup in data input but anyway...

If you are passing in datetime objects for plotting on the x-axis, you
can format the tick labels any way you want:

import matplotlib.ticker

formatter = ticker.DateFormatter('%Y-%m-%d %H:%M:%S')
ax.xaxis.set_major_formatter(formatter)

See the date_demo*.py examples at http://matplotlib.sf.net/examples