octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Qt graphics zooming


From: Ben Abbott
Subject: Re: Qt graphics zooming
Date: Tue, 03 Mar 2015 14:43:31 -0500

> On Mar 3, 2015, at 2:05 PM, John W. Eaton <address@hidden> wrote:
> 
> On 03/03/2015 02:01 PM, Ben Abbott wrote:
>>> On Mar 3, 2015, at 1:55 PM, John W. Eaton <address@hidden> wrote:
>>> 
>>> On 03/03/2015 01:28 PM, Rik wrote:
>>> 
>>>> This works well when using single mouse clicks.  I would add the same
>>>> code to the canvasWheelEvent so that mouse wheel zoom is also based on
>>>> the current location.
>>>> 
>>>> -- Canvas.cc:795 --
>>>> // FIXME: should we zoom about point for 2D plots?
>>>> 
>>>> ap.zoom (mode, factor);
>>>> -- End Code --
>>>> 
>>>> It looks like that may have been intended.
>>> 
>>> I'm not sure that's how Matlab works.  Maybe someone else can verify?
>>> 
>>> I don't really care one way or the other, but if we diverge from what 
>>> Matlab does, I expect we'll get a bug report about it...
>>> 
>>> jwe
>> 
>> I happy to try on Matlab, but I'm not following what needs to be done.
>> 
>> To illustrate where I'm lost .... If the mouse clicking the a zoom button 
>> why would the zoom be based upon the location of the mouse?
>> 
>> If a hot key is being used to zoom, I don't think Matlab supports that.
> 
> If you create a plot, then select the zoom mode from the toolbar, then click 
> in the plot window, does the zooming happen around the location of the click, 
> or does it happen around the center of the plot axes?

It zoom in on where the was located when clicked. I typically click-n-drag and 
Matlab zooms in on the contents of the rectangle.

> Similarly, if you are in zoom mode and zoom with the mouse wheel, does it 
> zoom around the location of the cursor, or does it zoom around the center of 
> the plot axes?

Matlab zoom relative to the center of the plot axes. For zoom-in mode, Matlab 
will not zoom-out beyond the original xlim(), ylim(). For zoom-out mode, Matlab 
will not zoom-in beyond the original limits either.

Ben


reply via email to

[Prev in Thread] Current Thread [Next in Thread]