comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Zooming in function graphics
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Zooming in function graphics [message #91991] Fri, 25 September 2015 12:21 Go to next message
wlandsman is currently offline  wlandsman
Messages: 743
Registered: June 2000
Senior Member
One thing that has kept me from committing to function graphics is the difficulty with interactive zooming. Say I am plotting a time series

f = randomn(seed,1000)
p = plot(f)

Now I want to change the X axis to be [0,100] instead of [0,1000]. I know I can set p.xrange=[0,100], but it is quicker to click on the zoom region. So I follow the documentation.

"hold down the <SHIFT> button on your keyboard while pressing your left mouse button. Your mouse pointer will change into an icon of a magnifying glass. Drag your mouse to define a zoom area, then release the <SHIFT> key and mouse button for the zoom operation to complete."


Ok, I first try to shift click on x = 0 which is the Y axis. But this selects the Y axis, and now moving the cursor moves the entire plot area instead of selecting a zoom region. Other plotting systems would let one click to the left of the Y axis when zooming and the zoom region then truncates to x = 0. But in IDL function graphics this outside region is insensitive to shift click.

So my only choice to click somewhere at X greater than 0, while being very careful not to touch the X or Y axes. I end up with a plot region of [5,100]

Today, I had an epiphany that the way to make this easier is to select the higher value first. By first selecting an interior region near x=100 and moving left, I can select a [0,100] region with less worry about accidentally touching an axis. Unfortunately, the selected region is then typically [-5,100] because IDL does not reset the zoom region to where there is actually data.

But the main problem is that shift+cursor is used both to select axes and to select a plotting region. Are there any preferences I can set to help me with this? Thanks, --Wayne
Re: Zooming in function graphics [message #91998 is a reply to message #91991] Mon, 28 September 2015 09:33 Go to previous messageGo to next message
Paul Van Delst[1] is currently offline  Paul Van Delst[1]
Messages: 1157
Registered: April 2002
Senior Member
Hello,

On 09/25/15 15:21, wlandsman wrote:

[description of problem about plot data/axes selection elided]

> But the main problem is that shift+cursor is used both to select axes
> and to select a plotting region. Are there any preferences I can
> set to help me with this? Thanks, --Wayne

I don't know of any preferences, but if I have to select close to the
axes, I move the plot within the window (using the middle mouse button)
so I can then select my region of interest -- which is now far enough
away from the axes to not interfere.

cheers,

paulv
Re: Zooming in function graphics [message #91999 is a reply to message #91998] Mon, 28 September 2015 11:03 Go to previous messageGo to next message
chris_torrence@NOSPAM is currently offline  chris_torrence@NOSPAM
Messages: 528
Registered: March 2007
Senior Member
On Monday, September 28, 2015 at 10:33:31 AM UTC-6, Paul van Delst wrote:
> Hello,
>
> On 09/25/15 15:21, wlandsman wrote:
>
> [description of problem about plot data/axes selection elided]
>
>> But the main problem is that shift+cursor is used both to select axes
>> and to select a plotting region. Are there any preferences I can
>> set to help me with this? Thanks, --Wayne
>
> I don't know of any preferences, but if I have to select close to the
> axes, I move the plot within the window (using the middle mouse button)
> so I can then select my region of interest -- which is now far enough
> away from the axes to not interfere.
>
> cheers,
>
> paulv

Hi Paul & Wayne,
Would it be helpful if the red zoom box snapped to the closest data point (in the X direction) while you were drawing it?
-Chris
Re: Zooming in function graphics [message #92001 is a reply to message #91999] Mon, 28 September 2015 11:50 Go to previous message
Paul Van Delst[1] is currently offline  Paul Van Delst[1]
Messages: 1157
Registered: April 2002
Senior Member
Hi Chris,

On 09/28/15 14:03, Chris Torrence wrote:
> On Monday, September 28, 2015 at 10:33:31 AM UTC-6, Paul van Delst wrote:
>> Hello,
>>
>> On 09/25/15 15:21, wlandsman wrote:
>>
>> [description of problem about plot data/axes selection elided]
>>
>>> But the main problem is that shift+cursor is used both to select axes
>>> and to select a plotting region. Are there any preferences I can
>>> set to help me with this? Thanks, --Wayne
>>
>> I don't know of any preferences, but if I have to select close to the
>> axes, I move the plot within the window (using the middle mouse button)
>> so I can then select my region of interest -- which is now far enough
>> away from the axes to not interfere.
>>
>> cheers,
>>
>> paulv
>
> Hi Paul & Wayne,
> Would it be helpful if the red zoom box snapped to the closest data
> point (in the X direction) while you were drawing it?

I dunno about Wayne, but I would definitely *not* want that to be the
default.

I would like me, not my data, to be in control of where the zoom box goes.

I do a lot of overshooting in my zoomboxing when I am drilling down to
very low levels so the snapping to the closest data point would not be
appreciated.

cheers,

paulv
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Covariance Matrix
Next Topic: PLOT and LEGEND Function Graphic

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 07:14:42 PDT 2025

Total time taken to generate the page: 0.00457 seconds