Hi, > * The time ranges are large (one-second samples over a period of > several days) and I find the x axis label formats are often > inappropriate to the scale. How to I control the format of > the x axis labels? >
I only started using matplolib a few days ago, but I think I know how to do what you want: ---------------------------------------- import matplotlib.dates as mdates # To read timestamps ... xAxisTimeFormat = '%a\n%H:%M' # Format of time stamps on x-axis hourLocator = mdates.HourLocator(interval=5) # Every 5 hours minuteLocator = mdates.MinuteLocator(interval=30) # Every half hour ... ax.xaxis.set_major_locator(hourLocator) # Set major tick marks ax.xaxis.set_minor_locator(minuteLocator) # Set minor tick marks ax.xaxis.set_major_formatter(mdates.DateFormatter(xAxisTimeFormat)) # Format x-axis labels ---------------------------------------- I have a full example of plots that have a point every minute over the course of days: http://www.hep.wisc.edu/cms/comp/routerqMonitor/index.html with a link to the full python script at the bottom. Mike ------------------------------------------------------------------------------ Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now! http://p.sf.net/sfu/devconference _______________________________________________ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users