【发布时间】:2019-10-06 03:21:23
【问题描述】:
这是一个最简单的例子:
set xrange [31:42]
set yrange [3.5:6.5]
set nokey
plot "-" using 2:3 smooth cspline
2015 34 4
2016 41 5
2017 40 6
2018 32 6
结果看起来不错,但忽略了时间序列:
使用 splot 代替 plot 的最小示例:
set view map
splot "-" using 2:3:1 with line
2015 34 4
2016 41 5
2017 40 6
2018 32 6
结果正确但看起来不太好:
我怎样才能像第一个例子一样平滑这个?
【问题讨论】:
-
gnuplot plot 命令的所有平滑选项首先使数据在维度 x 上单调。
-
由于结果是 LaTeX2e 文档中的图形,因此有一个 hack 解决方案:在 tiktz 中生成这条曲线并将其修补到图形上。
标签: time-series gnuplot smoothing