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
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-')
# turn off the 2nd axes rectangle with frameon kwarg
ax2 = twinx()
s2 = sin(2*pi*t)
plot(t, s2, 'r.')
snippet from my code >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
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]<>'N': #~ providing key to allow for skipping
View this message in context: http://www.nabble.com/twin---dual---two-axis-seems-to-confuse-or-break-toolbar-magnifier-tp20256700p20256700.html
Sent from the matplotlib - users mailing list archive at Nabble.com.