gnuplot图xy cspline,按顺序排列数据点

问题描述 投票:0回答:1

这里是一个最小的例子:

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   

the result looks nice but ignores the time series

使用splot代替plot的最小示例:

set view map
splot "-" using 2:3:1 with line
2015    34  4       
2016    41  5       
2017    40  6       
2018    32  6       

result is correct but does not look nice

如何像第一个示例中那样使它平滑?

time-series gnuplot smoothing
1个回答
0
投票

[我的解决方案:使gnuplot将复杂的图形输出而不会将此麻烦的非单调曲线绘制到LaTeX2e图片上,使用LaTeX2e TikZ软件包分别绘制该曲线,然后编辑图片以将曲线包含在正确的位置和比例中。

\ addplot [smooth]坐标{

(34,4)(41,5)(40,6)(32,6)

}

© www.soinside.com 2019 - 2024. All rights reserved.