gnuplot 中的极坐标图

Polar plot in gnuplot

我有问题。我正在尝试绘制极坐标图,事实上我想绘制一些理论线作为图中的一些实验数据。但是理论线的范围与实验数据不同,因为我必须这样做才能让 gnuplot 绘制它。

我有以下脚本:

####
reset
set encoding utf8
set size 1,1
set terminal epslatex
set output "direccionalidad.tex"

unset border

set polar 
set angles degrees #set gnuplot on degrees instead of radians

set style line 10 lt 1 lc 0 lw 0.3
set grid polar 30 #set the grid to be displayed every 60 degrees
set grid ls 10

set trange[-90:90]

f(t)=27.934*sin(1.81651*t+96.1991) # Theorical line

set xrange[-31:32]
set yrange[-30:30]

set xtics axis #disply the xtics on the axis instead of on the border
set ytics axis


set xtics scale 0 #"remove" the tics so that only the y tics are displayedj

set ytics (0, 6, 12) #make the ytics go from the center (0) to 6000 with incrment of 1000

unset ytics
set xtics ("5" 6, "15" 16.5, "30" 32) 
# set the xtics only go from 0 to 6000 with increment of1000 but do not display anything. This has to be done otherwise the grid will not be displayed correctly.

set rtics (5,15,30)
set rtics format ' ' scale 0


set_label(x, text) = sprintf("set label '%s' at (32*cos(%f)), (32*sin(%f))     center", text, x, x) #this places a label on the outside

eval set_label(0, "0") 

eval set_label(30, "30")

eval set_label(60, "60")

eval set_label(90, "90")

eval set_label(120, "120")

eval set_label(150, "150")

eval set_label(180, "180")

eval set_label(-150, "-150")

eval set_label(-120, "-120")

eval set_label(-90, "-90")

eval set_label(-60, "-60")

eval set_label(-30, "-30")

set size square

#PLOTS
plot "direccionalidaddatos.txt" u 1:3 pointtype 7 ps 2 lt 1 lw 3 lc rgb 'blue' notitle ,\
f(t) dt '-' lc rgb 'blue' notitle 

#ACABAMOS

###

这里有一些 direccionalidaddatos.txt 存档中的列示例,中间的列只是以弧度为单位的角度,但它没有用,因为我只想要以度为单位的角度,所以忽略它 ;) :

-90 -1.570796327 0.1

-85 -1.483529864 0.2

-80 -1.396263402 0.4

-75 -1.308996939 0.7

-70 -1.221730476 1.1

-65 -1.134464014 1.7

-60 -1.047197551 2.5

#

结果就是图片Polar plot

正如您在图片中看到的那样,有两个没有点的分支,我希望这些分支不会消失,因为它们并不意味着 graphic.So 中的 notihng 如果有人知道一种形式made dissapeared the branches, or to improve the script 让我知道嘿嘿。

非常感谢。

你能减少第二个绘图组件的采样范围吗?

plot "direccionalidaddatos.txt" u 1:3 pointtype 7 ps 2 lt 1 lw 3 lc rgb 'blue' notitle ,\
     [-52:45] '+' using 1:(f()) with lines dt '-' lc rgb 'blue' notitle