[Zoom function] bug in matplotlib ?

Hello,

I'm using archlinux, with all up-to-date packages, and matplotlib
within a python2 environment.

When I use the zoom function, it seems the zoom is decreasing instead
of increasing. Actually, the exact behaviour is to reproduce the old
figure in the smaller area selected by the zoom function.

That means the zoom behaviour is completely inverted.

Does anyone here with a last version of matplotlib confirm the bug
does still exist ?

Here a snippet to test the zoom behaviour :

$python2
<code python>
from pylab import *
plot( arange(0,pi,0.01) , sin(arange(0,pi,0.01)) )
show()
</code>

greetings.

David Kremer

Are you aware of the «zoom out to rectangle» feature (with right
click-n-drag, opposed to «zoom to rectangle» with left click-n-drag) ?
http://matplotlib.sourceforge.net/users/navigation_toolbar.html

···

Le mercredi 30 mars 2011 à 09:45 +0200, David Kremer a écrit :

Hello,

I'm using archlinux, with all up-to-date packages, and matplotlib
within a python2 environment.

When I use the zoom function, it seems the zoom is decreasing instead
of increasing. Actually, the exact behaviour is to reproduce the old
figure in the smaller area selected by the zoom function.

That means the zoom behaviour is completely inverted.

Does anyone here with a last version of matplotlib confirm the bug
does still exist ?

--
Fabrice

Fabrice Silva [03/30/2011 01:13 PM]:

Are you aware of the «zoom out to rectangle» feature (with right
click-n-drag, opposed to «zoom to rectangle» with left click-n-drag) ?
http://matplotlib.sourceforge.net/users/navigation_toolbar.html

This is a nice feature that I acually wasn't aware of either!

But speaking of zooming. How nice would it be to use the mouse wheel for that! Point at a position in the figure and just zoom in towards that point, keeping the (configurable) zoom factor constant for horizontal and vertical axes. To restrict the zoom to either horizontal *or* vertical axis one would simply hold 'x' or 'y', respectively, while using the mouse wheel.

If I had a wish list, that item would be on top. :slight_smile:

Cheers,
Joachim

Look at what occurs when using the Pan button (the four-arrows button)
and right-click (in combination with one of the w, y or CTRL keys) :slight_smile:
Documented on the same page.
It uses drag on right click instead of mouse wheel.

···

Le mercredi 30 mars 2011 à 13:49 +0200, Joachim Saul a écrit :

Fabrice Silva [03/30/2011 01:13 PM]:
> Are you aware of the «zoom out to rectangle» feature (with right
> click-n-drag, opposed to «zoom to rectangle» with left click-n-drag) ?
> http://matplotlib.sourceforge.net/users/navigation_toolbar.html

This is a nice feature that I acually wasn't aware of either!

But speaking of zooming. How nice would it be to use the mouse wheel for
that! Point at a position in the figure and just zoom in towards that
point, keeping the (configurable) zoom factor constant for horizontal
and vertical axes. To restrict the zoom to either horizontal *or*
vertical axis one would simply hold 'x' or 'y', respectively, while
using the mouse wheel.

If I had a wish list, that item would be on top. :slight_smile:

--
Fabrice

As far I'm concerned, I noticed indeed that the right click provide a
dezoom, while left click provide a zoom. I was confused because
gnuplot uses right click to zoom.

But I'm glad to see that this post has treshed a big discussion on the topic !

Thanks :slight_smile:

Fabrice Silva [03/30/2011 02:30 PM]:

But speaking of zooming. How nice would it be to use the mouse wheel for
that! Point at a position in the figure and just zoom in towards that
point, keeping the (configurable) zoom factor constant for horizontal
and vertical axes. To restrict the zoom to either horizontal *or*
vertical axis one would simply hold 'x' or 'y', respectively, while
using the mouse wheel.

If I had a wish list, that item would be on top. :slight_smile:

Look at what occurs when using the Pan button (the four-arrows button)
and right-click (in combination with one of the w, y or CTRL keys) :slight_smile:
Documented on the same page.

Hey, that's cool! :slight_smile:

It uses drag on right click instead of mouse wheel.

Yet it would be "nice" to have that function tied to the mouse wheel (like in Google maps, for instance) but that's not a complaint because the current behaviour is already very comfortable.

Thanks for pointing that out!

Cheers,
Joachim

···

Le mercredi 30 mars 2011 à 13:49 +0200, Joachim Saul a écrit :