我正在尝试做一个分段线性拟合(bash,本文档/脚本) gnuplot。我试过这个:
plot "datafile1" u 1:2:6:7:10:11 with xyerrorbars,\
"datafile1" u 1:4:8:9:10:11 with xyerrorbars,\
"datafile2" u 1:2:3 with xyerrorbars,\
[xmin:xmax] f(x)但是它返回一个无效的表达式错误。知道为什么会失败吗?
注- fit [xmin:xmax] f(x)不返回任何错误消息(因此我假设它有效)。
Gnuket4.4.3
发布于 2014-05-08 14:38:45
只允许在plot命令的开头指定范围。此范围适用于此plot命令中所有以逗号分隔的部分。所以你可以用
plot [xmin:xmax] f(x),\
"datafile1" u 1:2:6:7:10:11 with xyerrorbars但这将适用于[xmin:xmax]范围也适用于datafile1。如果只想限制f(x)的范围,则必须在所需范围之外定义无效的函数(1/0):
plot "datafile1" u 1:2:6:7:10:11 with xyerrorbars,\
"datafile1" u 1:4:8:9:10:11 with xyerrorbars,\
"datafile2" u 1:2:3 with xyerrorbars,\
(x > xmin && x < xmax) ? f(x) : 1/0请注意,您的原始命令将在即将发布的gnuket5.0版本中工作。
https://stackoverflow.com/questions/23543539
复制相似问题