如何在gnuplot中的图表下方设置标题

ter*_*rry 9 gnuplot title

例:

set title "title"
plot x
Run Code Online (Sandbox Code Playgroud)

这将绘制一个顶部带有标题的图表.我想在图表下移动标题.我该怎么办?更多,多色时同样的问题怎么样.我想为每个图下的每个小图移动标题.请注意,标题不是将放置在按键中的图表中的标题.非常感谢!

Chr*_*oph 13

使用的优点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
Run Code Online (Sandbox Code Playgroud)

在此输入图像描述

一旦你有一个太大的负偏移量,就会重置上边距,好像你没有标题,但是底部边距保持不变.

因此,您必须在图表下方手动设置标签,并相应调整底部边距:

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
Run Code Online (Sandbox Code Playgroud)

在此输入图像描述

无论如何,您需要手动干预和调整边距.