Question

Is there an interactive way to zoom the z axis using mouse or keys?

I can change x or y but not z.

wheel scroll changes y axis.

shift-wheel scroll change x axis.

But no combination I have tried affect the z.

EDIT 1

At Christoph's suggestion I added some binds. The ctrl- show up when I type "bind" but do nothing. the Tab- ones do not even show up when I type "bind"

bind 'Ctrl-Down' 'set yrange[GPVAL_Y_MIN+(0.2*(GPVAL_Y_MAX-GPVAL_Y_MIN)):GPVAL_Y_MAX+(0.2*(GPVAL_Y_MAX-GPVAL_Y_MIN))]; replot'
bind 'Ctrl-Up' 'set yrange[GPVAL_Y_MIN-(0.2*(GPVAL_Y_MAX-GPVAL_Y_MIN)):GPVAL_Y_MAX-(0.2*(GPVAL_Y_MAX-GPVAL_Y_MIN))]; replot'
bind 'Ctrl-Left' 'set yrange[GPVAL_Y_MIN-(0.2*(GPVAL_Y_MAX-GPVAL_Y_MIN)):GPVAL_Y_MAX+(0.2*(GPVAL_Y_MAX-GPVAL_Y_MIN))]; replot'
bind 'Ctrl-Right' 'set yrange[GPVAL_Y_MIN+(0.2*(GPVAL_Y_MAX-GPVAL_Y_MIN)):GPVAL_Y_MAX-(0.2*(GPVAL_Y_MAX-GPVAL_Y_MIN))]; replot'


bind 'Tab-Left' 'set zrange[GPVAL_Z_MIN+(0.2*(GPVAL_Z_MAX-GPVAL_Z_MIN)):GPVAL_Z_MAX+(0.2*(GPVAL_Z_MAX-GPVAL_Z_MIN))]; replot'
bind 'Tab-Right' 'set zrange[GPVAL_Z_MIN-(0.2*(GPVAL_Z_MAX-GPVAL_Z_MIN)):GPVAL_Z_MAX-(0.2*(GPVAL_Z_MAX-GPVAL_Z_MIN))]; replot'
bind 'Tab-Up' 'set zrange[GPVAL_Z_MIN-(0.2*(GPVAL_Z_MAX-GPVAL_Z_MIN)):GPVAL_Z_MAX+(0.2*(GPVAL_Z_MAX-GPVAL_Z_MIN))]; replot'
bind 'Tab-Down' 'set zrange[GPVAL_Z_MIN+(0.2*(GPVAL_Z_MAX-GPVAL_Z_MIN)):GPVAL_Z_MAX-(0.2*(GPVAL_Z_MAX-GPVAL_Z_MIN))]; replot'
Was it helpful?

Solution

You cannot use Tab as compositing key for a binding. When I try one of your lines like

bind 'Tab-Left' 'set zrange[GPVAL_Z_MIN+(0.2*(GPVAL_Z_MAX-GPVAL_Z_MIN)):GPVAL_Z_MAX+(0.2*(GPVAL_Z_MAX-GPVAL_Z_MIN))]; replot'

I get the message bind: cannot parse Tab-Left (tested with 4.6.4).

Using e.g Alt-Left works fine:

change_z(left,right) = sprintf('set zrange[GPVAL_Z_MIN+(%f*(GPVAL_Z_MAX-GPVAL_Z_MIN)):GPVAL_Z_MAX+(%f*(GPVAL_Z_MAX-GPVAL_Z_MIN))]; replot', left, right)
bind 'Alt-Left' 'eval(change_z(0.2, 0.2))'
bind 'Alt-Right' 'eval(change_z(-0.2, -0.2))'
bind 'Alt-Up' 'eval(change_z(-0.2, 0.2))'
bind 'Alt-Down' 'eval(change_z(0.2,-0.2))'
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top