Colors 如何在gnuplot中格式化Boxerrorbars
我试图在gnuplot中创建一个使用Boxerrorbars的图,但是我只得到了行而不是框。我如何正确地格式化它,以获得带有错误线的纯色框? 我的剧本:Colors 如何在gnuplot中格式化Boxerrorbars,colors,format,gnuplot,box,Colors,Format,Gnuplot,Box,我试图在gnuplot中创建一个使用Boxerrorbars的图,但是我只得到了行而不是框。我如何正确地格式化它,以获得带有错误线的纯色框? 我的剧本: #!/usr/bin/gnuplot -persist reset session set colorsequence classic $Data <<EOD #srvr pad type o/s h/s m/s ltnc kb/s 0 0 Sets 9460.76 --- --- 0.10300
#!/usr/bin/gnuplot -persist
reset session
set colorsequence classic
$Data <<EOD
#srvr pad type o/s h/s m/s ltnc kb/s
0 0 Sets 9460.76 --- --- 0.10300 955.14
1 0 Sets 6372.56 --- --- 0.14800 643.36
2 0 Sets 6803.38 --- --- 0.13800 686.85
0 0 Sets 8232.04 --- --- 0.11600 2382.64
1 0 Sets 6239.53 --- --- 0.14700 1805.93
2 0 Sets 6607.20 --- --- 0.14300 1912.35
0 0 Sets 8620.21 --- --- 0.11000 4650.04
1 0 Sets 6273.20 --- --- 0.14900 3383.98
2 0 Sets 6338.06 --- --- 0.14900 3418.97
0 0 Sets 8563.95 --- --- 0.10800 8910.03
1 0 Sets 6018.97 --- --- 0.15900 6262.21
2 0 Sets 6660.93 --- --- 0.13900 6930.11
0 0 Sets 8420.58 --- --- 0.11200 850.12
1 0 Sets 6277.14 --- --- 0.14900 633.73
2 0 Sets 7256.48 --- --- 0.13100 732.60
0 0 Sets 8144.12 --- --- 0.11600 2357.19
1 0 Sets 6146.69 --- --- 0.15300 1779.06
2 0 Sets 6689.36 --- --- 0.14100 1936.13
0 0 Sets 8326.71 --- --- 0.11600 4491.72
1 0 Sets 6129.93 --- --- 0.15400 3306.69
2 0 Sets 6617.88 --- --- 0.14200 3569.91
0 0 Sets 8018.55 --- --- 0.12200 8342.59
1 0 Sets 6340.77 --- --- 0.14800 6597.01
2 0 Sets 5800.46 --- --- 0.16600 6034.86
0 0 Sets 9517.29 --- --- 0.09900 960.85
1 0 Sets 6418.94 --- --- 0.14500 648.04
2 0 Sets 6264.59 --- --- 0.14900 632.46
0 0 Sets 8658.58 --- --- 0.10900 2506.09
1 0 Sets 6103.07 --- --- 0.15700 1766.44
2 0 Sets 7106.86 --- --- 0.13100 2056.97
0 0 Sets 8818.82 --- --- 0.10900 4757.17
1 0 Sets 6125.73 --- --- 0.15400 3304.43
2 0 Sets 6915.42 --- --- 0.13600 3730.42
0 0 Sets 9063.55 --- --- 0.10500 9429.82
1 0 Sets 6089.46 --- --- 0.15600 6335.54
2 0 Sets 6701.47 --- --- 0.13800 6972.29
EOD
ColG = 1
ColF = 2
ColS = 4
set table $Group
plot $Data u (column(ColG)) smooth freq
unset table
print $Group
set table $Filter
plot $Data u (column(ColF)) smooth freq
unset table
print $Filter
set table $Dummy
array Group[|$Group|-6] # gnuplot creates 6 extra lines
array Filter[|$Filter|-6]
plot $Group u (Group[$0+1]=$1) w table
plot $Filter u (Filter[$0+1]=$1) w table
unset table
print Group
print Filter
Check(i,j) = Group[i]==column(ColG) && Filter[j]==column(ColF) ? column(ColS) : NaN
set print $Data3
do for [i=1:|Group|] {
do for [j=1:|Filter|] {
undef var STATS*
stats $Data u (Check(i,j)) nooutput
if (exists('STATS_mean') && exists('STATS_stddev')) {
print Group[i], Filter[j], STATS_mean, STATS_stddev
}
}
print ""; print ""
}
set print
print $Data3
set output 'server_set_throughput.png'
set terminal png size 1000,800
set xtics ("Server 1" 1, "Server 2" 2, "Server 3" 3)
set xrange[0:4]
set yrange[0:10000]
set ylabel "Average Throughput for SET (Operations/Second)" font ",12"
set title "Server's SET Throughput" font "Helvetica,16"
set tics nomirror
set style line 12 lc rgb '#808080' lt 0 lw 1
set grid back ls 12
unset key
plot for [i=0:|Group|-1] $Data3 u ($1+1):3:4 index i w boxerrorbars
以及输出:
有两件事:
1框的宽度由set-boxwidth控制,除非您给出包含宽度的第四列数据。我在您的脚本中没有看到任何这样的命令,但从输出来看,宽度似乎以某种方式设置为0或接近零。添加显式命令集boxwidth 0.5
2填充样式默认为空。如果您想要实体框,请使用
set style fill solid border
如果给border关键字不带以下行属性集,则错误栏的颜色和线型将与框本身的颜色和线型相同。如果要突出显示错误条,请使用以下命令
set style fill solid border linecolor "black"
两件事:
1框的宽度由set-boxwidth控制,除非您给出包含宽度的第四列数据。我在您的脚本中没有看到任何这样的命令,但从输出来看,宽度似乎以某种方式设置为0或接近零。添加显式命令集boxwidth 0.5
2填充样式默认为空。如果您想要实体框,请使用
set style fill solid border
如果给border关键字不带以下行属性集,则错误栏的颜色和线型将与框本身的颜色和线型相同。如果要突出显示错误条,请使用以下命令
set style fill solid border linecolor "black"