Rectangle selection also kind of bugs out when you reach the edge of the axes.  
I looked into fixing this a while ago and had a partial solution.  The 
rectangle selector does some inaxes checking and relies on the xdata and ydata 
values.  These are invalid outside the axes, but you can fake it by using the 
pixel values and a the axes transform.  It might be worth adding a parameter to 
the rectangle selector to allow or disallow the rectangle to go outside of the 
axes.
-Ben


-----Original Message-----
From: Anne Archibald [mailto:peridot.face...@gmail.com] 
Sent: Monday, March 22, 2010 11:39 AM
To: Drain, Theodore R (343P)
Cc: matplotlib-devel@lists.sourceforge.net
Subject: Re: [matplotlib-devel] Selecting all the way to the edge of a plot

On 22 March 2010 11:32, Drain, Theodore R (343P)
<theodore.r.dr...@jpl.nasa.gov> wrote:
> 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.

I'd just like to point out that it's the UI that's deceptive: you can
actually zoom to the edges by doing just what you'd expect, but the
box showing where you're zooming to is wrong.

Anne

> 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)
> - zoom
>
> Hope that helps...
>
> Ted
> ________________________________________
> From: Anne Archibald [aarch...@physics.mcgill.ca]
> Sent: Sunday, March 21, 2010 3:42 PM
> To: Jae-Joon Lee
> Cc: matplotlib-devel@lists.sourceforge.net
> 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.j...@gmail.com> wrote:
>>
>>
>> On Sun, Mar 14, 2010 at 3:43 PM, Anne Archibald <aarch...@physics.mcgill.ca>
>> 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
> I'm seeing.
>
> 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.
>
> Anne
>
>> Regards,
>> -JJ
>>
> ------------------------------------------------------------------------------
> Download Intel&#174; Parallel Studio Eval
> Try the new software tools for yourself. Speed compiling, find bugs
> proactively, and fine-tune applications for parallel performance.
> See why Intel Parallel Studio got high marks during beta.
> http://p.sf.net/sfu/intel-sw-dev
> _______________________________________________
> Matplotlib-devel mailing list
> Matplotlib-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/matplotlib-devel
>

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel
------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel

Reply via email to