具有多个 "with" 个参数的 Gnuplot 命令

Gnuplot command with multiple "with" arguments

在 Gnuplot 中绘图:

例如,如果试图将数据点类型和错误栏都设置到一个命令中,则会出现 "with" 个参数的冲突,即:

plot "test.csv" using 1:2:3 with points pointtype 5 with yerrorbars

错误信息如下:绘图选项中的参数重复或矛盾。

有什么建议可以解决这个问题吗?

不,不能在一行中使用两个 with 个参数。

但在您的情况下,这不是必需的,因为 yerrorbars 样式也绘制了点:

set xrange [0:1]
set samples 11
plot '+' using 1:1:(*0.1) with yerrorbars pt 5

通常,可以通过将更多部分附加到单个 plot 命令来组合不同的绘图样式,例如

plot "file.dat" using 1:2 with lines, "" using 1:2:3 with yerrorbars