Help plotting dates

Hello, I’m finding it a little difficult to make a plot with dates:

I have an array with 2 columns. The first one is seconds since a certain date (let’s say 8th September, 8:00am). The second one is the variable I want to plot. The series spans several months so I want to have the major ticks be months (and have the name of the month printed below) and the minor ticks be days. I’m sure this is very easy to plot but I don’t know how to, any help?

Armando.

Hello,

You can experiment with the following lines to re-arrange your ticks.

current_axis = gca()
current_axis.xaxis.set_major_formatter()

Similarly set_minor_formatter for x and y axes.

See these links too

http://matplotlib.sourceforge.net/api/dates_api.html
http://matplotlib.sourceforge.net/examples/api/date_index_formatter.html

···

On Tue, Sep 8, 2009 at 7:45 AM, Armando Serrano Lombillo <arserlom@…287…> wrote:

Hello, I’m finding it a little difficult to make a plot with dates:

I have an array with 2 columns. The first one is seconds since a certain date (let’s say 8th September, 8:00am). The second one is the variable I want to plot. The series spans several months so I want to have the major ticks be months (and have the name of the month printed below) and the minor ticks be days. I’m sure this is very easy to plot but I don’t know how to, any help?

Armando.


Gökhan