如何解决在炮台中合并具有相同比例的地块
在使用具有指定大小和边距的Multiplot时,我很难获得预期的结果。我已附上一张图片,显示绘制数据时的问题。我对合并相同比例的地块感兴趣。为此,我在下面的代码中指定了xsize= 0.40,ysize= 0.90,and xinit= 0.10
。绘制数据文件时,右图的y轴比左图的y轴低。如果我没有循环播放,一切似乎都按预期进行。我什至尝试将xsize= 0.40,and xinit= 0.10
移到for循环内,但没有运气。
set term png
xsize= 0.40
ysize= 0.90
xinit= 0.10
do for [i=1:files] {
set output sprintf("Picture(x=-%d).png",i)
set multiplot layout 1,2
# Reset keys
unset rmargin
unset lmargin
# Set individual keys
set size xsize,ysize # Plot size in relation with canvas
set lmargin at screen xinit # x inital possition 0.10
set rmargin at screen xinit + xsize # x final possition 0.50
set xlabel "x[m]" offset 2,0 # Displace xlabel to the center of canvas
set ylabel "y[m]"
plot filename(i) using 4:3 with lines notitle
# Reset keys
unset rmargin # Clears the past x position
unset lmargin
unset label # Clears the past label
unset ytics # Removes the y axis tics
unset ylabel # Removes the y axis label
set size xsize,ysize # Plot size in relation with canvas
set lmargin at screen xinit+xsize # x inital possition 0.50
set rmargin at screen 1 - xinit # x final possition 0.90
plot filename(i) using 6:3 with lines notitle
unset multiplot
}
我想知道代码中可能是什么问题。感谢您的帮助。
解决方法
对于您的用例,应使用spacing
和margins
选项进行多重绘图:
set multiplot layout 1,2 margins 0.1,0.1,0.05,0.05 spacing 0,0
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。