|
From: James R. V. Z. <jr...@co...> - 2009-07-18 03:10:21
|
I've just checked in code to do "pan and zoom" with the mouse wheel.
These commands work like Acroread or Gimp:
- control-wheel-up zooms in toward the center of the plot
- control-wheel-down reverses the above
- wheel-up move the viewpoint up (increases both ymin and ymax by ten
percent of the plot range)
- wheel-down moves the viewpoint down
- shift-wheel-up moves the viewpoint left (decreases both xmin and xmax
by ten percent of the plot range)
- shift-wheel-down moves the viewpoint right
I implemented these just for completeness:
- shift-control-wheel-up zooms in only the X axis
- shift-control-wheel-down zooms out only the X axis
These work for linear or log axes.
A simple plot for testing, with or without log axes:
set parametric; plot sin(t)+1.02,cos(t)+1.02
(If zero is not currently on an axis, you can use "L" to toggle
logscale along that axis.)
I'll be glad to add documentation, but first I'll see what changes
people want. E.g.:
- Are the pan and zoom steps reasonable? Should they be user-tunable?
- Do you have a better idea for shift-control-wheel?
- Each of these commands is added to the zoom stack, so they can be
undone individually. That was easy to implement, but do we want that?
Does "u" recover all that memory? Should we suggest that the user
type "u" occasionally?
- Jim Van Zandt
|