about negative polar plots
special_dragonfly
Dominic at PLEASEASK.co.uk
Tue Aug 14 10:13:47 CEST 2007
"Erik Max Francis" <max at alcyone.com> wrote in message
news:9radnTbkCoefwFzbnZ2dnUVZ_vPinZ2d at speakeasy.net...
> yadin wrote:
>
>> hi am doing a polar plot of the radiation pattern of an antenna.
>> the polar plots represents the value of the power in dB's and the dB
>> go from -40dB to 0dB
>> as the angle theta changes from 0 to 2*pi rads
>> the polar plot in python goes with positive values
>> how can i solve this problem
>> rough example
>> example:
>> power = arange(-40,0,-10)
>> theta = arange(0, 2pi,pi/12)
>> polar(power,theta)
>> title.....?
>> how can i show the step on the polar plot plot(-40, -30,-20,-10,0)
>
> What is arange? What is polar? What is plot? You're going to have to
> give more information about what you're doing, what you're using to do it,
> and where it's giving you unexpected or undesired results if you want help
> solving your problem.
>
> --
> Erik Max Francis && max at alcyone.com && http://www.alcyone.com/max/
> San Jose, CA, USA && 37 20 N 121 53 W && AIM, Y!M erikmaxfrancis
> So look into my eyes / I won't tell you lies
> -- Neneh Cherry
I can understand the problem, that when plotting in polar co-ordinates the
center of the plot is a value of zero. You're wanting a value of -40 at the
center? Is this a fixed quantity? The lines would then extend out to be zero
at infinity, presumably by an inverse square law (as it's dB's - unless my
physics is wrong).
It sounds horrible, but if you know the angle and value, could you not
convert to cartesian co-ordinates and plot them?
Am I also right in thinking that the example you've given is MATLAB code
where you have essentially 2 lists and a function?
So power=arange(-40,0,-10) is a list looking like this: [-40,-30,-20,-10,0]
theta is a list from 0 to 2pi increasing in increments of pi/12 and the
function polar takes the power and theta value and returns... pass (would
need to look up the function).
http://www.k0gkd.com/fd02.jpg <-- something like this at the end of the day
is what is wanted - correct?
Now I'm not sure why you can't take your negative value and modulus it with
40 (or whatever value you want at the center). So -40 becomes 40 becomes 0
(the center), -30 becomes 30 becomes 10 (the next band out?)
At the end of the day it'll be the labels on the graph you need to change.
Tell me if this helps!
Dominic
More information about the Python-list
mailing list