我想用两个误差栏(statistics和statistics+systematics)绘制实验数据,可以这样做:
unset key
set xrange [0.5:5.5]
$data << EOD
1 1 0.1 0.2
2 2 0.1 0.3
3 3 0.1 0.4
4 4 0.1 0.5
5 5 0.1 0.6
EOD
plot "$data" u 1:2:3 lc 1 ps 1 with yerrorbars, \
"" u 1:2:4 lc 1 ps -1 with yerrorbars但是,这将为两个错误条添加较小的水平线。我希望总误差只有一条垂直线,统计误差只有一条小水平线。我可以删除所有的小水平线通过添加
set errorbars small但是,我怎么可能看到第一个plot命令的水平线("set errorbars large"),而第二个plot命令没有水平线("set errorbars small"),但都在同一个plot中?
结果应该如下所示:

发布于 2018-08-22 01:23:15
对于没有水平线的绘图,使用with vectors而不是with yerrorbars
unset key
set xrange [0.5:5.5]
$data << EOD
1 1 0.1 0.2
2 2 0.1 0.3
3 3 0.1 0.4
4 4 0.1 0.5
5 5 0.1 0.6
EOD
plot "$data" u 1:2:3 lc 1 ps 1 with yerrorbars, \
"" u 1:($2-$4):(0):(2*$4) with vectors nohead lc 1

https://stackoverflow.com/questions/51948861
复制相似问题