Gnuplot:在multiplot中对齐直方图的条

Gnuplot:在multiplot中对齐直方图的条,plot,gnuplot,histogram,Plot,Gnuplot,Histogram,我试图在多点图中绘制3个直方图。三个dat文件是: Sta1.dat: 收件人,mu2,mu3,mu4 20, 4.9, 17.1, 78.1 25, 4.0, 22.0, 74.0 30, 2.0, 17.0, 81.0 35, 11.5, 21.7, 66.8 40, 4.7, 18.0, 77.4 45, 3.8, 8.9, 87.3 50, 0.6, 17.3, 82.1 55, 2.0, 3.4, 94.6 60,

我试图在多点图中绘制3个直方图。三个dat文件是:

Sta1.dat:
收件人,mu2,mu3,mu4
20,    4.9, 17.1, 78.1 
25,    4.0, 22.0, 74.0 
30,    2.0, 17.0, 81.0 
35,   11.5, 21.7, 66.8 
40,    4.7, 18.0, 77.4 
45,    3.8,  8.9, 87.3 
50,    0.6, 17.3, 82.1 
55,    2.0,  3.4, 94.6 
60,    1.0,  1.3, 97.6 
Sta2.dat
收件人,mu2,mu3,mu4
20,   5.3, 20.6, 74.2
25,   9.2, 27.2, 63.6
30,   9.5, 20.3, 70.2
35,   9.9, 22.1, 68.0
40,   5.3, 19.0, 75.7
45,   3.4,  9.6, 86.9
50,   2.3, 15.3, 82.4
55,   2.7, 10.6, 86.7
60,   1.7,  1.0, 97.3
Sta3.dat
收件人,mu2,mu3,mu4
20,    6.8, 20.6, 72.6
25,    6.2, 29.5, 64.3
30,    5.3, 23.6, 71.1
35,    4.5, 15.6, 79.9
40,    5.5, 17.4, 77.1
45,    3.7, 10.5, 85.8
50,    9.1, 16.6, 74.3
55,    2.8,  3.8, 93.4

60,1.0,1.6,97.4
我对您的代码做了一些更改,以使用
多点
命令选项。我删除了单个
边距
大小
原点
调整,并在终端设置上应用了全局字体大小。这种奇怪的行为(我不知道如何)来自上一个
plot
命令的
ti col

set terminal pngcairo font ",8"
set output "num.png"
set style data histogram
set style histogram rowstacked
set style fill solid
set key outside
set boxwidth 0.5

set datafile separator ","

set key bottom right Left  # Better alignment to text
set key title 'Signal Strength' offset -1.5,0
set xtics nomirror
set yrange [0:100] # The same yrange to all plots

# layout, direction, 
# margins and 
# spacing for plots (see 'help multiplot')
set multiplot \
    layout 3,1 upwards \
    margins 0.08,0.85,0.08,0.94 \
    spacing 0.1,0.07
# ----------------------------------------------------
set title "Station3" offset 0,-0.7
plot for [COL=2:4] 'sta3.dat' using COL:xtic(1) ti col
# ----------------------------------------------------
set xtics tc bgnd # To draw an "invisible" xtics
set title "Station2"
plot for [COL=2:4] 'sta2.dat' using COL:xtic(1) ti col
# ----------------------------------------------------
unset key
set title "Station1"
plot for [COL=2:4] 'sta1.dat' using COL:xtic(1) ti col
unset multiplot
exit 
最终结果是: