強調的textPlotting腳本,用於爲以前版本的gnuplot工作 (v4.2.6)不再適用於最新版本(v4.4.0),併爲以下腳本生成 錯誤消息線。如何從gnuplot指定yerrorbar風格
plot "data_file" u ($1+0.5):2 title "legend1" w boxes fs solid 0.85,
"" u ($1+0.5):2:3 notitle w yerrorbars 1,
....
錯誤消失,因爲我改變「yerrorbars 1」 到 「yerrorbars」。 但是,這會禁止自定義錯誤欄樣式。 任何人都可以告訴我我該怎麼做對嗎?
我附上導致錯誤和錯誤消息的測試代碼。
#!/opt/local/bin/gnuplot
set term postscript monochrome enhanced
set output "test.eps"
set grid x y
set xtics nomirror
set ytics 1.5 font "Helvetica, 18"
set yrange [0:10]
set xrange [0:10]
set boxwidth 1
set bmargin 3
set key top left
plot "test.dat" u ($1+0.5):2 title "test0" \
w boxes fs solid 0.85, \
"" u ($1+0.5):2:3 notitle w yerrorbars 1, \
"" u ($1+1.5):4 title "test1" w boxes fs solid 0.7, \
"" u ($1+1.5):4:5 notitle w yerrorbars 1
我在腳本上面運行了以下數據。
$ cat test.dat
1 1.315119617 0.131 1.199138756 0.136
7 5.382161114 0.002 4.818144427 0.003
並且它生成了以下錯誤消息。
$ gnuplot test.plt
plot "test.dat"
....
^ "test.plt", line 17: ';' expected
正如我上面提到的,錯誤消失當我改變yerrorbar 1到yerrorbar但這阻止我指定的錯誤欄樣式。
請發佈您在上面運行腳本時得到的錯誤。 – Woltan
我剛剛更新了問題,以獲得示例代碼和數據。感謝您的關注! – kjee
我不清楚,你如何指定一個yerrorbar風格。據我所知,只有[this](http://t16web.lanl.gov/Kawano/gnuplot/intro/style-e.html#errorbars)風格。你能指出你以後的風格嗎? – Woltan