Hi I apologize for my late response, I was in the hospital.
Thanks for the tip, the ticks are now magically divided by a constant. Here's some input on scaling the input data: Say -- you have 25000 points of data. You want to capture each and every point of data on a plot. Mpl lists the ticks as a function of the number of data points, which is cool. Now comes a situation where in you want to manipulate the ticks to display - say the time, for eg., the 100th data point came in at 1 sec, the 200th came in at 2 sec, and so on - Is scaling the input data the way to go ? -iyer --- John Hunter <[EMAIL PROTECTED]> wrote: > On 4/10/07, Iyer <[EMAIL PROTECTED]> wrote: > > > If only someone could guide me, so that I can > > understand better how to "translate" the ticks > from > > the default "number of sample" ticks to that of > > different ticks - say > > new_ticks=original_ticks/(some_constant). Right > now > > I'm clueless, your input will help a lot in > > understanding Mpl. > > > OK, your persistence is admirable. You are still > asking the wrong > question and applying the wrong solution, but > dog-golly, you've earned > the right to do it the wrong way! > > from matplotlib.ticker import FuncFormatter > > def myformatter(x, pos=None): > return '%1.3f'%(x/4.) > > ax = subplot(111) > ax.plot(x, y) > ax.xaxis.set_major_formatter(FuncFormatter(myformatter)) > > Now all your ticks are magically divided by 4. > > But really, simply scaling your x input data is the > way to go. If we > want to move this conversation forward, you should > try instead > > plot(x/4, y) > > and then explain as clearly as possibly this doesn't > do what you want. > ____________________________________________________________________________________Boardwalk for $500? In 2007? Ha! Play Monopoly Here and Now (it's updated for today's economy) at Yahoo! Games. http://get.games.yahoo.com/proddesc?gamekey=monopolyherenow ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users