私は Gnuplot の初心者で、入力 .dat ファイルからグラフを作成しようとしています。私の .dat ファイルの最初の列は、「ビルド番号」に似た番号であり、これらの番号を列の 1 つの値として使用しようとしています。
この .dat ファイルの場合:
#Version-Number Average-Error Average-Performance
1 4.100333 41.76998
2 4.100333 41.76998
正しい列1と2を取得します。
しかし、この .dat ファイルの場合:
#Version-Number Average-Error Average-Performance
0.80.0.17598 4.100333 41.76998
0.80.0.17599 4.100333 41.76998
次のような列を取得します: 0.792 0.794 0.796... 探している値 (4.100333) は 0.8 になります。
これは私が持っている .dat ファイルです: (CompareResults.dat と呼ばれます)
#Version-Number Average-Error Average-Performance
0.80.0.17598 4.100333 41.76998
0.80.0.17599 4.100333 41.76998
0.80.0.17602 4.100333 41.76998
0.80.0.17622 4.100333 41.76998
コードを添付しています。
set terminal wxt size 1000,800
set multiplot layout 2, 1 title "Compare Graphs" font ",18"
set tmargin 2
set boxwidth 1 absolute
set style fill solid 1.00 border lt -1
set grid nopolar
set grid noxtics nomxtics ytics nomytics noztics nomztics \
nox2tics nomx2tics noy2tics nomy2tics nocbtics nomcbtics
set grid layerdefault linetype 0 linewidth 1.000, linetype 0 linewidth 1.000
set pointsize 2
set xtics border in scale 0,0 mirror norotate offset character 0, 0, 0 autojustify
set xtics ()
set ytics border in scale 0,0 mirror norotate offset character 0, 0, 0 autojustify
set ztics border in scale 0,0 nomirror norotate offset character 0, 0, 0 autojustify
set cbtics border in scale 0,0 mirror norotate offset character 0, 0, 0 autojustify
set rtics axis in scale 0,0 nomirror norotate offset character 0, 0, 0 autojustify
set title "Average Error Graph" font ",12"
set xlabel "Build Number"
set ylabel "Average Error"
set lmargin 8
set rmargin 4
set tmargin 4
set bmargin 4
plot 'CompareResults.dat' using 1:2 notitle with lines lc rgb "red" lw 3, '' using 1:2:2 with labels offset 1,0.5 notitle
set title "Performance Graph" font ",12"
set xlabel "Build Number"
set ylabel "Performance"
plot 'CompareResults.dat' using 1:3:xtic(1) notitle with lines lc rgb "green" lw 3, '' using 1:3:3 with labels offset 1,0.5 notitle
unset multiplot
reset
どうもありがとう!!!イダン。