I tried to plot some data in polar coordinates with gnuplot and then draw a smooth line.
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
I expected gnuplot to draw ovoid curve between points, but it drew strange 开发者_JAVA百科line from left to right ignoring polar coordinates. Do you think there is any solution?
csplines are cubic so that's the best you can get with them. Try
plot 'data.dat' smooth bezier
but even then, you can't achieve much with such a small data set.
There is another trick you can try but it improves things only a little: you first output a table of the data generated by smooth bezier
normal plot and then plot them polar:
# 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
精彩评论