我有一些数据,我想将它们与平滑曲线连接起来。我不要线。我在下面附上一些要点。我想要一条曲线而不是线条。谁能告诉我如何在 gnuplot 中做到这一点?
-111 -0.07
-24 0.09
62 0.12
69 -0.2
86 -0.7
99 0.74
101 -0.69
-45 0.2
120.403 -0.5848
170 -0.353
247.891 -0.105295
321 0.0925
Run Code Online (Sandbox Code Playgroud)
小智 9
使用以下命令,例如,
plot "foo" u 1:2 smooth bezier
Run Code Online (Sandbox Code Playgroud)
替代贝塞尔曲线的其他选项是 sbezier、csplines、acsplines。我只是针对我的数据测试它们,看看哪一个最适合我的目的。
使用smooth的选项plot,有 csplines:
plot "DATA" smooth csplines, "DATA" with points
Run Code Online (Sandbox Code Playgroud)
bezier如果您想让曲线通过这些点,则不应使用,因为它将以最少的自由度数进行最佳拟合。