我有以下数据
Name Value of the bar Confidence interval
A 0.62 [0.59 0.63]
B 0.64 [0.54 0.72]
C 0.51 [0.46 0.67]
D 0.33 [0.25 0.36]
我试图将其绘制为条形图,其中A,B,C和D分别标记每个条形和误差线。
通过使用
plot "my.dat" using 1; with boxes
我只有条形图。有人能帮我吗?
如果还需要错误栏,则必须添加具有yerrorbars
绘图样式的第二个绘图。括号在数据文件中不是很方便,因此我使用以下sed
命令将其删除:
set style fill solid
set boxwidth 0.8
set yrange [0:*]
unset key
plot "< sed 's/[][]//g' my.dat" using 0:2:xtic(1) with boxes, \
'' using 0:2:3:4 with yerrorbars lc rgb 'black' pt 1 lw 2
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句