How to change radial pincers in Julia PyPlot polar plot?
Using julia and PyPlot (it looks like it calls matplotlib), I have a radial log plot ranging from 0dB at the outer edge of the plot to -50dB in the interior:
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]() ;
which looks like this:
I would like to reset the polar pincers so that the radial marker markers are displayed from:
- 1 → 0 dB
- 0.8 → -10 dB
- 0.6 → -20 dB
- 0.4 -> -30 dB
- 0.2 → -40 dB
How can I do that?
+3
source to share