例子:
set title "title"
plot x
这将在顶部绘制带有标题的图形。我想将标题移动到图形下面。我该怎么做? 此外,在多个小图中出现相同的问题时,我想将每个小图s的标题移动到每个图形下方。 请注意,标题不是将放置在键中的图中的标题。 非常感谢!
使用set title
的优点是,它会自动为标题保留一些垂直空间。这仅在将标题放置在图形上方时有效。
如果要将标题放置在图形下方,您只能通过指定offset
来实现。但在这种情况下,您必须手动调整偏移量和底部边距:
考虑以下示例:
set multiplot layout 1,3
set title "title"
plot x
set title "positive offset" offset 0,1
plot x
set title "negative offset" offset 0,-2
plot x
unset multiplot
如果您有一个太大的负偏移量,顶部边距会被重置,就好像您没有标题一样,但底部边距保持不变。
因此,您必须在图形下方手动设置一个标签,并相应地调整底部边距:
set multiplot layout 1,3
set xlabel "xlabel"
set label 11 center at graph 0.5,char 1 "first title" font ",14"
set bmargin 5
plot x
set label 11 "second title"
plot x
set label 11 "third title"
plot x
unset multiplot
无论如何,您都需要手动干预和微调边距。