当我的 x 值是非数字时,我无法让 gnuplot 绘制带有误差线的图。
例如“data.dat”:
天 col1 col2 星期一 12 4 星期二 10 3 星期三 9 2 星期四 11 3 星期五 9 2 星期六 12 3 星期日 8 2
我试过的变种
plot "./data.dat" using 2:3:xtic(1) with yerrorlines
plot "./data.dat" using 2:3:xtic(1) with yerrorlines
plot "./data.dat" using 1:2:3 with yerrorlines
Run Code Online (Sandbox Code Playgroud)
然后回来Not enough columns for this style或者
warning: Skipping data file with no valid points
x range is invalid
plot绘制 (day,col1,col2) => (x,y,y_err)的命令是什么?
xtic, 或xticlabels, 不算作数据列。这就是为什么yerrorlines抱怨没有足够的列。您可以为枚举提供隐式列 0。
plot "./data.dat" using 0:2:3:xticlabels(1) with yerrorlines
Run Code Online (Sandbox Code Playgroud)