Xof*_*ofo 9 scripting plot gnuplot
我对gnuplot边距有点困惑.首先,我不知道这些东西指向的单位.它们是指向画布坐标还是它们是画布坐标的一部分.它们在gnuplot模式和多时隙模式下的行为是否相同?
在多时隙模式下绘制一些数据时出现问题.我正在密切关注屏幕(wtx终端).让我们说我正在搞糟糕的事情 - 我从画布上得到了阴谋,或者是非常小的难以理解的情节.
没有边距,第一个绘图是在画布顶部齐平,所以我自然想把它向下推.
有人可以解释gnuplot边距是如何工作的,以及它们在多点模式下的行为是否相同.
Chr*_*oph 10
是的,边距在"正常"绘图模式和多色模式下表现非常相似.基本上,边距可以有三种不同的"模式":
set lmargin 2.单位为字符宽度(或字符高度为tmargin和bmargin).set lmargin at screen 0.1,将左边的绘图边框设置为总画布宽度的10%.multiplot模式的唯一区别是,1和2中边距的参考由layout选项确定的网站给出:
set multiplot layout 2,2
这将整个画布细分为四个大小相等的矩形.现在,使用
set lmargin 1
set rmargin 1
set tmargin 1
set bmargin 1
在每个子图的每一侧相对于较小的矩形留下一个字符宽度或高度的边距:
set multiplot layout 2,2
set lmargin 0
set rmargin 0
set tmargin 0
set bmargin 0
set format ''
plot x
plot x**2
plot x**3
plot x**4
unset multiplot

set multiplot layout 2,2
set lmargin 1
set rmargin 1
set tmargin 1
set bmargin 1
set format ''
plot x
plot x**2
plot x**3
plot x**4
unset multiplot

如果要设置每个边框的绝对位置,这会变得更加麻烦,因为您必须为每个绘图设置四个边距(layout在这种情况下,选项没有任何效果):
set multiplot
set lmargin at screen 0.1
set rmargin at screen 0.47
set tmargin at screen 0.97
set bmargin at screen 0.6
plot x
...
Gnuplot版本5提供了一种非常灵活的方法来生成相等的矩形,请参阅我在gnuplot multiplot中删除空白间隙的答案
| 归档时间: | 
 | 
| 查看次数: | 9772 次 | 
| 最近记录: |