我一直在制作一堆堆积的直方图,如本页底部附近所示。
我能够调整我的情节,使其看起来像我想要的那样,但我正在努力解决关键问题。它很大,所以我想把它放在情节下方。
明智的做法似乎是set key outside below center
但是,看起来 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

