小编Ann*_*nna的帖子

在 gnuplot 中,如何用线条绘图但跳过丢失的数据点?

我有一个与每一天相关的值,例如:

120530    70.1
120531    69.0
120601    69.2
120602    69.5
# and so on for 200 lines
Run Code Online (Sandbox Code Playgroud)

在 gnuplot 中用线条绘制此数据时,数据点连接良好。不幸的是,在某些地方可能会丢失超过一周的数据点。Gnuplot 在这些间隔上绘制长线。如何让 gnuplot 只在连续几天内连接点?

需要对数据进行预处理的解决方案很好,因为我已经用脚本对其进行了平滑处理。

这是我使用的:

set xdata time
set timefmt "%y%m%d"
plot "vikt_ma.txt" using 1:2 with lines title "first line", \\
     ""            using 1:3 with lines title "second line"
Run Code Online (Sandbox Code Playgroud)

例子: gnuplot 示例

gnuplot

21
推荐指数
2
解决办法
3万
查看次数

标签 统计

gnuplot ×1