gnuplot how to zoom y & y2 axis

耗尽温柔 提交于 2020-01-05 12:18:17

问题


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'


来源:https://stackoverflow.com/questions/20423794/gnuplot-how-to-zoom-y-y2-axis

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!