我有一个与每一天相关的值,例如:
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 ×1