From: Michael D. <md...@st...> - 2008-11-05 14:14:19
|
Thanks for the re-explanation. I can confirm that this is broken as recently as 0.91.2. However, it works as expected with a recent SVN trunk, and matplotlib 0.98.3. It seems what this is doing is adjusting the limits twice (for each of the twin axes), the first correctly, and then again by applying the same rectangle to the adjusted limits. I will go ahead and fix this on the 0.91.x maintenance branch. (It seems Sourceforge's SVN is down at the moment, so I can't right now). I've also attached a patch that *may* apply to 0.90.0. It's a lot of work for me to move back to that version to test given the change in Numpy dependencies etc. If the patch doesn't work for you, you may just want to consider upgrading to the most recent 0.98.x. Cheers, Mike wet_colored)arch wrote: > 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? > > Response>> > I confirmed it is 0.90.0 (I am running on Windows) > attached is code (which is simply example packaged with matplot lib) > > ALSO: > > the default figure: of which I selected the region from 2-4 on the x-axis > for magnifying > the resulting figure from magnifying: you can see much of the content from > 2-4 is missing (I selected the entire y axis with the magnifier) -- the > xaxis is only selecting a subset of the range I chose > the expected figure: I used the crossed arrows instead of the magnifier to > create a plot figure that roughly mimics what I expected... I expected to > see all data in y from x = 2 to 4 > > Is my expectation wrong? I expect the x and y axis range selected by the > magnifier tool to be fully represented in the subsequent representation of > the data - it always seems to be subset of the data range chosen. > > http://www.nabble.com/file/p20334562/two_scales.py two_scales.py > http://www.nabble.com/file/p20334562/two_scales_baseline.png > two_scales_baseline.png > http://www.nabble.com/file/p20334562/two_scales_2to4_concern.png > two_scales_2to4_concern.png > http://www.nabble.com/file/p20334562/two_scales_2to4_expectation.png > two_scales_2to4_expectation.png > -- Michael Droettboom Science Software Branch Operations and Engineering Division Space Telescope Science Institute Operated by AURA for NASA |