gnuplot x(y)平滑 [英] Gnuplot x(y) smoothing

查看:107
本文介绍了gnuplot x(y)平滑的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何平滑以x(y)形式显示的数据?无效的Gnuplot平滑功能可处理此类情况.

How do I smooth the data presented in the form x(y)? Gnuplot smoothing function of to invalid handles such cases.

例如:

文件(T-L.dat):

File(T-L.dat):

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会话:

Gnuplot session:

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

我拥有的东西.

添加平滑:

gnuplot> plot "T-L.dat" with lines smooth csplines

效果也不佳(仅2个链接,很抱歉).

Result not good too (only 2 links, sorry).

其他功能也无法提供我想要的结果. 但是真的我需要花键.

Other features also not give the result that I wanted to. But really I need a spline.

推荐答案

正确的gnuplot可以使用样条曲线平滑仅y(x)形式的数据.为此,在对数据进行平滑处理之前,先使其在x中呈单调性.您的数据相对于y是对称的,这就是为什么由于平滑而得到一条直线的原因.

Correct, gnuplot can smooth with splines only data of the form y(x). For this, the data is rendered monotonic in x before smoothing it. You data is symmetric with respect to y, this is why you get a straight line as result of the smoothing.

为了相对于y平滑数据,必须首先交换轴并将平滑结果保存到临时文件中.然后使用正确的轴选择进行绘制:

In order to smooth your data with respect to y, you must first exchange the axes and save the result of the smoothing to a temporary file. This is then plotted with the correct axis selection:

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

这篇关于gnuplot x(y)平滑的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆