我正在绘制来自几个txt文件及其衍生文件的数据。
data1 = "AAA.txt"
data2 = "BBB.txt"
data3 = "CCC.txt"
data4 = "DDD.txt"
plot data2 u 2:4 w l lt 1 lw 3.5 lc rgb "red" title "b-O", \
data3 u 2:4 w l lt 1 lw 3.5 lc rgb "blue" title "c-O", \
data1 u 2:4 w l lt 1 lw 3.5 lc rgb "web-green" title "a-O", \
data4 u 2:4 w l lt 1 lw 3.5 lc rgb "forest-green" title "d-O", \
data2 u (dx=$2-x0,x0=$2,$2-dx/2):(dy=$4-y0,y0=$4,dy/dx) smooth sbezier w l lt 1 lw 3.5 lc rgb "orange" title "b-O deri" axes x1y2, \
data3 u (dx=$2-x0,x0=$2,$2-dx/2):(dy=$4-y0,y0=$4,dy/dx) smooth sbezier w l lt 1 lw 3.5 lc rgb "skyblue" title "c-O deri" axes x1y2, \
data1 u (dx=$2-x0,x0=$2,$2-dx/2):(dy=$4-y0,y0=$4,dy/dx) smooth sbezier w l lt 1 lw 3.5 lc rgb "light-green" title "a-O deri" axes x1y2, \我希望得到导数在x的特定范围内的斜率。为此,我需要对导数应用线性拟合,或者需要将导数数据打印到txt文件并应用线性拟合。
我真的不知道如何将fit应用于Gnuplot中的导数。因此,我希望将派生数据打印到txt文件中,然后对派生数据应用拟合。
我搜索了一些参考资料,但我找不到在Gnuplot中将派生数据打印到txt文件的方法。是否可以应用"set print“命令将派生数据打印到Gnuplot中的txt文件?
发布于 2020-11-09 13:59:53
我不能重现你的问题,因为你错过了定义导数,但是:
可以通过table将任何打印输出到数据文件。例如:
set table 'valami.dat'
plot norm(x)
unset tablehttps://stackoverflow.com/questions/64742876
复制相似问题