Panning and Zooming using the ScaleGraph Macro
The ScaleGraph macro (*) allows zooming and panning through a long time series or data sequence. Running the macro produces a dialog for modifying the X axis. Download the macro here scalegraph.zip.
The top row pans to the left or right while the bottom row allows zooming in or out. The other controls:
1. Changes the X axis scale type (linear, log10, natural log)
2. Changes the Y axis scaling to maximize the Y range for the specific X range displayed
3. Switch to the Scale Y axis dialog
4. Set manually entered scale limits
5. Returns to the previously selected scaling
So, for example, zooming in by 5x followed by panning 90% to the left two times produces the graph below right which shows fine detail of the first two peaks.
|Original||Zoom 5X||Pan Left 90% Twice|
The Y axis dialog is obtained by clicking the Set Y Axis button and has similar controls.
To use the macro, open the worksheet and make sure that the graph is current and displayed on top (so no other windows are above it). Then run the ScaleGraph macro. Keep your graph window smaller than full screen and position the ScaleGraph dialog so that it does not overlap the graph.
Zoom in on the X axis scale by clicking the In 5X, In 2X or In 1.2X buttons. (Similarly, you can zoom out). Using the arrow buttons <== 50%, etc. you can pan along the X axis. If the Autoscale Y axis option box is checked, it will rescale each time the axis is changed.
Selecting the Scale Y button will give similar control over the Y axis scale. You can press the autoscale X or Y and it will rescale the graph. You can also manually enter limits or select the axis scaling (linear, log 10, natural log).
Pressing the OK button will exit the macro.
(*) Thanks to Tom Huber, Dept. of Physics, Gustavus Adolphus College