Can you be more specific about what is going wrong? The zoom magnifier seems to work fine for me with or without twinx, but perhaps we just have different expectations of how it works. Could you perhaps provide screenshots?
I'm checking against SVN trunk. I didn't check against 0.90.1, since it would require installing an older version of numpy, and other dependency dances etc. But I'm happy to dig further once I have a better idea of what is going wrong for you. This FAQ explains how to get the version number and other useful information for a bug report: http://matplotlib.sourceforge.net/faq/troubleshooting_faq.html#report-a-problem Cheers, Mike wet_colored)arch wrote: > I am trying to code an application with two checkboxes, one associated with > each axis on a simple plot. I can then turn on and off lines in the plot > that are scaled either to the left side or right side of the plot. > > This is working fine and patterned after some of the examples from > matplotlib. > > However, when I use the toolbar feature with the "magnifier" the scaling is > not usually correct. More specifically, if I select an area with the > magnifier, the next drawing of the information is not scaled right. > (ususally it is a smaller subset of the data selected) > > I have confirmed when I run without twinx , the magnifier works fine. > > I also have noticed that when running the example from matplotlib the same > thing happens. I have searched a bit looking for perhaps a bug or comment in > forums on how to workaround this or perhaps I have done something wrong, but > no luck. Perhaps I don't understand how the magnifier is supposed to work > but when I disable the twinx capability of my code, things seem to work > fine. (I'm still mostly a noob but I am persistent.) > > I believe I have 0.90 or perhaps one earlier. I wasn't completely sure how > to check but 0.90 is shown in the __init__.py file. > > I have attached the matplotlib provided example that I feel doesn't work > right. I also have a snippet of my code below. (which is structured a bit > different than the example but when I run identical to the snippet, using > the structure of my code I get an error due to twinx not being a method of > subplot - as I recall) > > from two scales example provided with matplotlib > > > from pylab import * > > ax1 = subplot(111) > t = arange(0.01, 10.0, 0.01) > s1 = exp(t) > plot(t, s1, 'b-') > xlabel('time (s)') > ylabel('exp') > > > # turn off the 2nd axes rectangle with frameon kwarg > ax2 = twinx() > s2 = sin(2*pi*t) > plot(t, s2, 'r.') > ylabel('sin') > ax2.yaxis.tick_right() > show() > > > snippet from my code >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> > > self.axL=subplot(132, position=[0.2,0.1,0.6,0.8]) > self.axR=twinx(self.axL) > self.rax1=subplot(131, position=[0.01, 0.10, 0.14, 0.8]) > self.rax2=subplot(133, position=[0.85, 0.10, 0.14, 0.8]) > > for key in sorted(dict): > if dict[key][1]<>'N': #~ providing key to allow for skipping > data set > visibility=dict[key][2] > exec("self.l%s, = > self.ax%s.plot(glbl.fusdata%s,visible=visibility,ls=dict[key][4],color=dict[key][3])"% > (key,dict[key][1],key)) > > -- Michael Droettboom Science Software Branch Operations and Engineering Division Space Telescope Science Institute Operated by AURA for NASA ------------------------------------------------------------------------- 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