3
使用朱莉娅和PyPlot(看起来像它调用matplotlib)我有一个径向数图,从0分贝对剧情的外缘到-50dB的内部:如何更改茱莉亚PyPlot极坐标图中的径向刻度?
using PyPlot ;
theta = 0:0.02:1 * pi ;
n = length(theta) ;
U = cos(theta).^2 ;
V = zeros(size(U)) ;
for i = 1:n
v = log10(U[i]) ;
if (v < -50/10)
v = 0 ;
else
v = v/5 + 1 ;
end
V[i] = v ;
end
f1 = figure("p2Fig1",figsize=(10,10)) ; # Create a new figure
ax1 = axes(polar="true") ; # Create a polar axis
pl1 = plot(theta, V, linestyle="-", marker="None") ;
dtheta = 30 ;
ax1[:set_thetagrids]([0:dtheta:360-dtheta]) ;
ax1[:set_theta_zero_location]("E") ;
f1[:canvas][:draw]() ;
,看起来像:
我想复位极性蜱使得径向记号标记物选自映射:
- 1 - > 0分贝
- 0.8 - > -10分贝
- 0.6 - > -20分贝
- 0.4 - > -30分贝
- 0.2 - > -40分贝
如何可能?