【发布时间】:2017-06-16 00:15:42
【问题描述】:
我是使用 gnuplot 的新手,我关注了 this question,它可以根据需要绘制数据。但是,我非常想包括误差线。我尝试通过添加最小和最大错误列来做到这一点,如下所示:
Broswer,Video,min,max,Audio,min,max,Flash,min,max,HTML,min,max,JavaScript,min,max
IE,30%,5,5,10%,5,5,25%,5,5,20%,5,5,15%,5,5
Chrome,20%,5,5,5%,5,5,35%,5,5,30%,5,5,10%,5,5
然后我尝试使用修改如下的脚本进行绘图:
set terminal pdf enhanced
set output 'bar.pdf'
set style data histogram
set style histogram cluster gap 1
set style fill solid border rgb "black"
set auto x
set yrange [0:*]
set datafile separator ","
plot 'data.dat' using 2:xtic(1) title col with yerrorbars, \
'' using 3:xtic(1) title col with yerrorbars, \
'' using 4:xtic(1) title col with yerrorbars, \
'' using 5:xtic(1) title col with yerrorbars, \
'' using 6:xtic(1) title col with yerrorbars
据我了解,这也应该绘制错误栏,但我得到了错误:
“plot2”,第 16 行:此样式的列数不足
谷歌搜索这个错误告诉我它与第一列是非数字有关。我尝试了一些建议,包括this one,但到目前为止没有任何效果。那么,有什么建议吗?谢谢。
【问题讨论】:
标签: gnuplot