Thanks Angus. I tried this out ... it works once and only once! BTW, The correct thing to do is res=fig.gca() res.fmt_xdata=foo() #instead of format_xdata res.fmt_ydata=foo()
although, like I said, it only first for the first event. Somehow res.fmt_xdata is getting set back to None Mathew Angus McMorland wrote: > Hi Mathew, > > 2008/10/13 Mathew Yeates <[EMAIL PROTECTED] > <mailto:[EMAIL PROTECTED]>> > > Okay, I've gotten this far. I have a Figure and I think I can > change the > formatting of the values displayed in the toolbar by setting > taking the > X axis and setting the function > format_xdata > to something of my own (something that computes lat/lon). Similar idea > for the Y axis. > > So, given my figure, how do I get the X and Y axis? All I see is > gca(). > But how can I get both? Using fig.get_axes() I only got 1 axis. > > > I think this is a terminology issue: the axis objects returned by > gca() or in the list returned by get_axes() incorporate both the > 'axes' in the sense of x and y axes. With the single result of gca() > you can get at both the x and y axes. For example: > > import matplotlib.pyplot as plt > ax = plt.gca() > ax.set_xlims(xmin=-1) > ax.set_ylims(ymax=0) > ax.format_xdata = ... # if this is how you use this bit - haven't > needed to change these myself > ax.format_ydata = ... > > I hope that helps, > > Angus. > > -- > AJC McMorland > Post-doctoral research fellow > Neurobiology, University of Pittsburgh ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users