Double zooming with twinx

I'm plotting two curves in one subplot with twinx to allow different y scales.
The script below is an example.
When zooming in using zoom-to-rect on Tk's navigation toolbar2 (TkAgg is my
backend) I think the x axis part of the zoom is happening twice. Rubberbanding
the example from x=20 to 80 results in a zoomed x range of about 32 to 68,
which is about what you'd expect for zooming with the same range twice.

Is there a way of restricting this to only one zoom?

Paul

···

------------
from pylab import *
f=figure(1)
ax1=f.add_subplot(111)
ax1.plot(arange(100))
ax2=twinx(ax1)
ax2.plot(-arange(100),'g')
draw()

------------
python 2.5
winxp
matplotlib 0.91.1

Paul Smith wrote:

I'm plotting two curves in one subplot with twinx to allow different y scales. The script below is an example. When zooming in using zoom-to-rect on Tk's navigation toolbar2 (TkAgg is my backend) I think the x axis part of the zoom is happening twice. Rubberbanding the example from x=20 to 80 results in a zoomed x range of about 32 to 68, which is about what you'd expect for zooming with the same range twice.

Is there a way of restricting this to only one zoom?

Paul
------------
from pylab import *
f=figure(1)
ax1=f.add_subplot(111)
ax1.plot(arange(100))
ax2=twinx(ax1)
ax2.plot(-arange(100),'g')
draw()

------------
python 2.5
winxp
matplotlib 0.91.1

Indeed, this appears to be a bug. I put this on the develop mailing list.

Manuel