gnuplot - 平滑插值x = f(y)

use*_*610 5 plot interpolation gnuplot

我想绘制一个二维图形,其中我的数据的csplines插值在y轴上有一个独立的变量.插值函数应为x = f(y)形式.没有切换轴有没有办法做到这一点?

gnuplot的:

set terminal svg size 400,300 enhanced fname 'arial'  fsize 10 butt solid
set output 'out.svg'
set xrange [10:13]
plot "data.txt" using 2:1 notitle #smooth csplines
Run Code Online (Sandbox Code Playgroud)

数据:

1 11.45294118
2 11.43529412
3 11.18823529
4 10.98235294
5 10.94117647
6 11.28823529
7 11.27058824
Run Code Online (Sandbox Code Playgroud)

Mig*_*uel 6

您可以使用a table作为中间文件,并以通常的方式进行插值:

set table "data2.txt"
plot "data.txt" using 1:2 notitle smooth csplines
unset table
set xrange [10:13]
plot "data2.txt" using 2:1 w l notitle
Run Code Online (Sandbox Code Playgroud)

在此输入图像描述

如果您想要更高的分辨率,可以set samples在绘制到表格之前使用.