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

标签 plot gnuplot interpolation

我想用我的数据的 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

数据:
1 11.45294118
2 11.43529412
3 11.18823529
4 10.98235294
5 10.94117647
6 11.28823529
7 11.27058824

最佳答案

您可以使用 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

enter image description here

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

关于plot - gnuplot - 平滑插值 x=f(y),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25526542/

相关文章:

gnuplot 直方图标签值

Gnuplot 对数图 y 轴

Gnuplot 在条形图之间放置 xtics

python - 2D 插值导致 OverflowError : Too many data points to interpolate

python - 带有python的分段立方Hermite插值器的根

matlab - 使用幅度向量在极坐标中创建绘图

linux - 使用 png() 和 dev.off() 在 R 中打印 plot(lm(y~x)

matplotlib - 在循环中使用 savefig() 时出现 IOError "Too many open files"

r - 插入/扩展季度到月度系列

r - 如何在 R 的 bquote 中为主要情节设置粗体字体?