Preventing tic labels from resizing graph in gnuplot

心已入冬 提交于 2019-12-02 09:54:51

You can use set lmargin to set a fixed left margin. With e.g. set lmargin 10 you fix the left margin to 10 character widths:

set multiplot layout 2,1
set lmargin 10    
set xrange [0:10]
plot x

set xrange[0:100000]
plot x
unset multiplot

Of course, you must still find an appropriate setting for the left margin size.

As another point, also the label position depends on the ticlabel length.

set multiplot layout 2,1
set lmargin 10
set ylabel 'ylabel'

set xrange [0:10]
plot x

set xrange[0:100000]
plot x
unset multiplot

So you would need to change the ylabel position with the offset parameter. To have it more general, you can put the ylabel with a usual set label command to have it fixed independent of the margin settings:

set multiplot layout 2,1
set lmargin 10
set label 1 'manual label' at screen 0.03,graph 0.5 center rotate by 90

set xrange [0:10]
plot x

set xrange[0:100000]
plot x
unset multiplot

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