Zooming in function graphics [message #91991] |
Fri, 25 September 2015 12:21  |
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
|
|
|