# ploting issues in program

Gerard Flanagan grflanagan at yahoo.co.uk
Thu Aug 16 18:37:47 CEST 2007

```On Aug 16, 9:48 am, yadin <conra2... at yahoo.com> wrote:
> hi every one!
>
> so that the center is at the minimun negative number in voltagedb
> and the maximun is at zero and how can i see values on the axis like
> showing that the axes start at -50 -40 -30 .....and end at zero
> than you

Just guessing, does plotting the following rectangular coords give you
any insight?
Seems to be a rough figure of eight.

theta =  [ 4.36332313e-003, 3.18522588e-001, 6.32681854e-001,
9.46841119e-001,
1.26100038e+000, 1.57515965e+000, 1.88931892e+000,
2.20347818e+000,
2.51763745e+000, 2.83179671e+000, 3.14595598e+000,
3.46011524e+000,
3.77427451e+000, 4.08843377e+000, 4.40259304e+000,
4.71675230e+000,
5.03091157e+000, 5.34507083e+000, 5.65923010e+000,
5.97338936e+000,]

voltage =  [ 0.00363471, 0.26569155, 0.52562334, 0.76330428,
0.93673361, 1.        ,
0.93321713, 0.75733232, 0.5185449 , 0.25840091,
0.00363471, 0.26569155,
0.52562334, 0.76330428, 0.93673361, 1.        ,
0.93321713, 0.75733232,
0.5185449 , 0.25840091,]

from math import *

#dbvoltage = [20*log10(1/v) for v in voltage]
dbvoltage = [-20*log10(v) for v in voltage]

def mkpoint(m, arg):
return m*sin(arg), m*cos(arg)

graph = [mkpoint(m,arg) for m, arg in zip(dbvoltage, theta)]

for point in graph:
print point

(0.21288849842373814, 48.790140231909419)
(3.6052811402858937, 10.933359102749559)
(3.303355590073223, 4.505208562238618)
(1.9039899333399253, 1.3706766199218816)
(0.54065408491628131, 0.17306473975245495)
(0.0, 0.0)
(0.57014803194263397, -0.18800662846533356)
(1.9469751572632745, -1.427581247329087)
(3.3327193729963271, -4.6294392863200207)
(3.5834113333756323, -11.194573773272479)
(-0.21288865846549074, -48.790140231211105)
(-3.6052811229041124, -10.933359108481211)
(-3.3033556009317082, -4.5052085542768472)
(-1.9039899297901561, -1.3706766248528219)
(-0.54065408602566212, -0.17306473628675043)
(0.0, 0.0)
(-0.57014803261753888, 0.18800662641861987)
(-1.9469751623879956, 1.4275812403398493)
(-3.3327193896150562, 4.6294392743562476)
(-3.5834113735618405, 11.194573760408771)

Gerard

```