gnuplot:极坐标中的平滑线

时间:2011-02-26 21:43:59

标签: gnuplot

我尝试用gnuplot在极坐标中绘制一些数据,然后绘制一条平滑的线。

data.dat文件:

0 10
20 15
40 40
60  80
80  140
100 140
120 80
140 40
160 15
180 10

gnuplot的:

set polar
set angle degrees
set grid
set grid polar
plot "data.dat" smooth csplines

我期望gnuplot在点之间绘制卵形曲线,但它从左到右画出了奇怪的线,忽略了极坐标。你认为有什么解决方案吗?

1 个答案:

答案 0 :(得分:1)

csplines是立方体,所以这是你可以得到的最好的。尝试

plot 'data.dat' smooth bezier

但即便如此,如此小的数据集也无法取得多少成就。

你可以尝试另一种技巧,但它只是改进了一些东西:你首先输出一个由smooth bezier正常情节产生的数据表,然后绘制它们的极性:

# save smooth bezier data
set table
set output 'b_data.dat'
plot 'data.dat' smooth bezier

# plot
unset table
set term x11
set polar
set angle degrees
set grid
set grid polar
plot "b_data.dat" w lines
相关问题