Gnuplot-在绘图下方安装键

Gnuplot-在绘图下方安装键,gnuplot,Gnuplot,我一直在制作一组堆叠的直方图,如图底部所示 我能够调整我的情节,使之看起来像我想要的,但我正在努力寻找关键。它相当大,所以我想把它放在地块下面 明智的做法似乎是将钥匙设置在中央下方的外侧 但是,看起来gnuplot实际上是将键的第二列居中,而不是将键作为一个整体居中 我的问题是:我如何着手解决这个问题 以下是我的完整gnuplot代码: set terminal postscript enh color eps font ",18" set output "SO.eps" set style

我一直在制作一组堆叠的直方图,如图底部所示

我能够调整我的情节,使之看起来像我想要的,但我正在努力寻找关键。它相当大,所以我想把它放在地块下面

明智的做法似乎是
将钥匙设置在中央下方的外侧

但是,看起来gnuplot实际上是将键的第二列居中,而不是将键作为一个整体居中

我的问题是:我如何着手解决这个问题

以下是我的完整gnuplot代码:

set terminal postscript enh color eps font ",18"
set output "SO.eps"

set style data histogram
set style histogram rowstacked
set style fill solid border 0
set boxwidth 0.9
set tmargin 2
set bmargin 10
set key outside below center vertical maxrows 4 width -5


set yrange [0:600]
set y2range [0:100]

set xlabel "Number of compute nodes"
set ylabel "Computation Time (s)"
set y2label "Efficiency (%)"
set ytics nomirror
set xtics nomirror
set y2tics 20

plot newhistogram lt 1 , \
"SO.dat" index 0 u 2:xtic(1) title "Warm-Up", \
"" index 0 u 3 title "First program configuration", \
"" index 0 u 4:xtic(1) title "Second configuration", \
"" index 0 u 5 title "Target", \
newhistogram lt 1 , \
"SO.dat" index 1 u 2 notitle, \
"" index 1 u 3 notitle, \
"" index 1 u 4:xtic(1) notitle, \
"" index 1 u 5 notitle, \
newhistogram lt 1 , \
"SO.dat" index 2 u 2 notitle, \
"" index 2 u 3 notitle, \
"" index 2 u 4:xtic(1) notitle, \
"" index 2 u 5 notitle, \
newhistogram lt 1 , \
"SO.dat" index 3 u 2 notitle, \
"" index 3 u 3 notitle, \
"" index 3 u 4:xtic(1) notitle, \
"" index 3 u 5 notitle, \
"SO.dat" index 4 u 1:2 title "First program efficiency" with linespoints axes x1y2, \
"" index 4 u 1:3 title "Second program efficiency" with linespoints axes x1y2, \
"" index 4 u 1:4 title "Target efficiency" with linespoints axes x1y2

稍微修改一下脚本,最终得到了我想要的结果。

问题来自此命令:

将关键帧设置为中心垂直最大行下方外侧4宽度-5`

这相当于写:

set key outside below
set key vertical maxrows 4 width -5
这与:

set key vertical maxrows 4 width -5
set key outside below
顺序很重要。在第一个(错误)命令中,键首先以其(默认)单列格式放置在图形下方,然后将其布局更改为两列。但其原始的x、y定位保持不变

在给出所需结果的第二个命令中,首先确定“两列”键布局。然后将关键点设置在具有更新宽度的图形下方,并适当居中


稍微修改一下脚本,最终得到了我想要的结果。

问题来自此命令:

将关键帧设置为中心垂直最大行下方外侧4宽度-5`

这相当于写:

set key outside below
set key vertical maxrows 4 width -5
这与:

set key vertical maxrows 4 width -5
set key outside below
顺序很重要。在第一个(错误)命令中,键首先以其(默认)单列格式放置在图形下方,然后将其布局更改为两列。但其原始的x、y定位保持不变

在给出所需结果的第二个命令中,首先确定“两列”键布局。然后将关键点设置在具有更新宽度的图形下方,并适当居中