He there,

I'm new to matplotlib but have really been appreciating the thorough
documentation and examples online.  I've never worked with matlab either so
I'm stumbling  my way around a bit, but have managed to get some basic plots
working with my wxPython program.

I'm plotting some simple time/temp curves.  For the time, I have just the
number of seconds, starting at 0 and going up to about 1200 (20 minutes).
I'm trying to format the xaxis so that there is a tick mark every one
minute, and format the tick marks so they display %M:%S.  The code below
doesn't give me *any* formatting or tick marks on the xaxis.  It seems like
this should be fairly obvious how to accomplish, but I'm not getting it.

What am I doing wrong here?


xvals = range(1200)
yvals = list of temps

self.mainline = self.ax.plot(xvals, yvals, lw=2, color='red')[0]

locator = matplotlib.dates.MinuteLocator()
self.ax.xaxis.set_major_locator(locator)
self.ax.xaxis.set_minor_locator(locator)

formatter = matplotlib.dates.DateFormatter('%M:%S')
self.ax.xaxis.set_major_formatter(formatter)
self.ax.xaxis.set_minor_formatter(formatter)

# draw the canvas


Any help appreciated...thanks!
BZ
------------------------------------------------------------------------------
This SF.net email is sponsored by:
High Quality Requirements in a Collaborative Environment.
Download a free trial of Rational Requirements Composer Now!
http://p.sf.net/sfu/www-ibm-com
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to