gnuplot how to zoom y & y2 axis

2019-08-03 05:26发布

问题:

I have a plot like this using wgnuplot:

the green and blue are on y2 axis.

Question 1:

When I zoom using right mouse button I get:

The black line on yaxis is to compressed near top. How can I get the y scale to fit the data for this window at this point AUTOMATICALLY. I.e.e without me having to type range commands?

Questions 2:

Again, is there anyway to rescale/zoom the y2axis ALONE, by mouse?

回答1:

Just press 'a' or click the autoscale button to adjust the y-scale. Maybe you want to use set autoscale xfix before that.

Its not by mouse, but you can use the bind command to rescale only the y2-axis with the hotkeys 'alt-z' and 'alt-y':

bind 'alt-z' 'set y2range[GPVAL_Y2_MIN*2:GPVAL_Y2_MAX*2]; replot'
bind 'alt-y' 'set y2range[GPVAL_Y2_MIN*0.5:GPVAL_Y2_MAX*0.5]; replot'


标签: zoom gnuplot