I'd like to throw another vote in for this feature as well. We have a lot of cases like this and not being able to zoom to the limits of the window is a real head ache.
Back in the old days (when we were maintaining our own plot library), we solved this by allowing the bounding rectangle to be drawn outside the figure (assuming the mouse started inside the figure). When the mouse is released, the limits are reduced by the current axes values before applying the zoom. Something like:
- mouse click outside the figure - handle like normal
- mouse click inside the figure - start zooming
- mouse drag - draw zoom box
- mouse leaves figure - keep drawing zoom box (change from current havior)
- mouse release - if mouse is outside figure zoom box started in, reduce zoom box to limits of axes (change from current behavior)
Hope that helps...
From: Anne Archibald [aarchiba@...824...]
Sent: Sunday, March 21, 2010 3:42 PM
To: Jae-Joon Lee
Subject: Re: [matplotlib-devel] Selecting all the way to the edge of a plot
On 21 March 2010 18:10, Jae-Joon Lee <lee.j.joon@...149...> wrote:
On Sun, Mar 14, 2010 at 3:43 PM, Anne Archibald <aarchiba@...824...> > wrote:
Often when I want to
zoom in, I want to change only (say) the upper x and y limits.
I pushed a change into the svn that enables this, but in a different way
than you suggested.
The behavior I implemented is similar to the current behavior of the "pan"
mode, i.e., if you hold the "x" key pressed during pan/zoom, only the x-axis
is updated. Same for "y" key.
I hope this is good for your needs also.
Well, it's an interesting feature, but it doesn't address the problem
What I'd like to be able to do is, say, to change only the upper x and
y limits, simply click where I want those limits to be and drag right
off the corner of the plot. This actually works, but when I do this
the drag rectangle freezes the moment my pointer leaves the axes, so
that it does not represent the area being zoomed to.
I've attached a screenshot illustrating the bug. Note where the
pointer is and where the "to be zoomed" rectangle is.
I use Linux, with the default backend, whatever that is.