首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Gnuplot (Y)平滑

Gnuplot (Y)平滑
EN

Stack Overflow用户
提问于 2014-09-30 16:39:42
回答 1查看 2.7K关注 0票数 2

如何平滑以x(y)形式表示的数据?图形平滑函数对无效处理这样的情况。

例如:

档案(T-L.dat):

代码语言:javascript
复制
0.00    0.0
0.10    0.1
0.15    0.2
0.40    0.3
0.60    0.4
0.50    0.5
0.60    0.6
0.40    0.7
0.15    0.8
0.10    0.9
0.00    1.0

我想要的

Gnuplot会话:

代码语言:javascript
复制
knkd@SCP71:~/MEAS/HEAT$ gnuplot

        G N U P L O T
        Version 4.6 patchlevel 4    last modified 2013-10-02 
        Build System: Linux x86_64

        Copyright (C) 1986-1993, 1998, 2004, 2007-2013
        Thomas Williams, Colin Kelley and many others

        gnuplot home:     http://www.gnuplot.info
        faq, bugs, etc:   type "help FAQ"
        immediate help:   type "help"  (plot window: hit 'h')

Terminal type set to 'wxt'
gnuplot> plot "T-L.dat" with lines

我所拥有的

添加平滑:

代码语言:javascript
复制
gnuplot> plot "T-L.dat" with lines smooth csplines

结果也不好(只有2个链接,对不起)。

其他特性也没有给出我想要的结果。但我真的需要一条样条。

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2014-09-30 20:56:51

正确,用样条图可以平滑只使用表格y(x)的数据。为此,在平滑数据之前,数据在x中是单调的。你的数据相对于y是对称的,这就是为什么你得到一条直线作为平滑的结果。

为了平滑有关y的数据,必须首先交换轴并将平滑结果保存到临时文件中。然后用正确的轴选择绘制此图:

代码语言:javascript
复制
set table 'T-L-smoothed.dat'
plot 'T-L.dat' using 2:1 smooth csplines
unset table
plot 'T-L-smoothed.dat' using 2:1 with lines, 'T-L.dat' with points pt 7

票数 3
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/26125886

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档