From: Paul S. <pau...@ca...> - 2008-04-07 07:40:10
|
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 |