Grid 如何限制gnuplot中的极坐标网格?

Grid 如何限制gnuplot中的极坐标网格?,grid,gnuplot,Grid,Gnuplot,我的数据是极坐标,当我绘制它们并尝试添加极坐标网格时,它将是完整的圆,但我的数据仅为0-60度 如何将网格限制在0-60度范围内,而不是一个完整的圆?我不知道这有什么内置功能。但是,作为一种解决方法,可以使用multiplot手动绘制网格线。 例如: set term pngcairo enhanced size 800,800 set output 'fig.png' set angles degrees set multiplot set lmargin at screen 0.1 s

我的数据是极坐标,当我绘制它们并尝试添加极坐标网格时,它将是完整的圆,但我的数据仅为0-60度


如何将网格限制在0-60度范围内,而不是一个完整的圆?

我不知道这有什么内置功能。但是,作为一种解决方法,可以使用
multiplot
手动绘制网格线。 例如:

set term pngcairo enhanced size 800,800
set output 'fig.png'

set angles degrees

set multiplot

set lmargin at screen 0.1
set tmargin at screen 0.9
set rmargin at screen 0.9
set bmargin at screen 0.1

set samples 1000
unset border

R_max = 1
dR = 0.2

phi_max = 60.
dphi = 15

set xr [0:R_max]
set yr [0:R_max]

set xtics out nomirror
unset ytics

set style line 42 lc rgb '#666666' dt 3

unset key
plot \
    for [i=0:phi_max/dphi] (x>=0&&x<=R_max*cos(i*dphi))?tan(i*dphi)*x:1/0 w l ls 42

set polar
set trange [0:phi_max]
unset raxis
unset rtics
plot \
    for [i=1:ceil(R_max/dR)] i*dR<=R_max?i*dR:1/0 w l ls 42

unset raxis
unset rtics
plot cos(t) w l lw 2 lc rgb 'dark-red'
设置术语pngcairo增强型尺寸800800
设置输出“fig.png”
设置角度和角度
集多点
将lmargin设置为屏幕0.1
将tmargin设置为屏幕0.9
将rmargin设置为屏幕0.9
将bmargin设置为屏幕0.1
设置样本1000个
未设置边界
R_max=1
dR=0.2
phi_max=60。
dphi=15
设置xr[0:R\u max]
设置年份[0:R_max]
设置xtics输出名称错误
取消加密
设置样式行42 lc rgb'#666666'dt 3
取消设置键
密谋\

对于[i=0:phi_max/dphi](x>=0&&x我不知道这方面的内置功能。但是,作为一种解决方法,可以使用
multiplot
手动绘制网格线。 例如:

set term pngcairo enhanced size 800,800
set output 'fig.png'

set angles degrees

set multiplot

set lmargin at screen 0.1
set tmargin at screen 0.9
set rmargin at screen 0.9
set bmargin at screen 0.1

set samples 1000
unset border

R_max = 1
dR = 0.2

phi_max = 60.
dphi = 15

set xr [0:R_max]
set yr [0:R_max]

set xtics out nomirror
unset ytics

set style line 42 lc rgb '#666666' dt 3

unset key
plot \
    for [i=0:phi_max/dphi] (x>=0&&x<=R_max*cos(i*dphi))?tan(i*dphi)*x:1/0 w l ls 42

set polar
set trange [0:phi_max]
unset raxis
unset rtics
plot \
    for [i=1:ceil(R_max/dR)] i*dR<=R_max?i*dR:1/0 w l ls 42

unset raxis
unset rtics
plot cos(t) w l lw 2 lc rgb 'dark-red'
设置术语pngcairo增强型尺寸800800
设置输出“fig.png”
设置角度和角度
集多点
将lmargin设置为屏幕0.1
将tmargin设置为屏幕0.9
将rmargin设置为屏幕0.9
将bmargin设置为屏幕0.1
设置样本1000个
未设置边界
R_max=1
dR=0.2
phi_max=60。
dphi=15
设置xr[0:R\u max]
设置年份[0:R_max]
设置xtics输出名称错误
取消加密
设置样式行42 lc rgb'#666666'dt 3
取消设置键
密谋\

对于[i=0:phi_max/dphi](x>=0&&x非常感谢,它帮了我很多忙。如果可能的话,我还有一个问题。我正在使用此代码用网格绘制热图数据,它与链接中的热图数据一样完美,但它不会填充整个区域,如果我使用dgrid3d,它会给我一个正方形。我必须将我的数据从极坐标转换为笛卡尔坐标,以便在此链接中使用splot,谢谢将找到这两个图和代码,我正在使用数据样本0.0498099 0.0043558-568.242889 0.0996199 0.00871117-569.395867 0.14943 0.0130668-570.975623 0.19924 0.0174223-572.153443非常感谢,它帮助了很多。如果可能的话,我还有一个问题。我正在使用此代码绘制热图数据和网格,它工作得非常完美正如在链接中一样,但它没有填充整个区域,如果我使用dgrid3d,它会给我一个正方形。我必须将我的数据从极坐标转换为笛卡尔坐标,以便在这个链接中使用splot,你会发现两个图形和代码,我使用的数据样本是0.0498099 0.0043558-568.242889 0.0996199 0.00871117-569.395867 0.14943 0.0130668-570.975623 0.19924 0.0174223 -572.153443