472,143 Members | 1,603 Online

# ploting issues in program

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
here is the program
import wx
import os
from wx.lib.colourdb import *
from pylab import*
angteta = [ 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,]

#voltagedb = 20*log10(voltage)

voltagedb = [-48.7906044 ,-11.51244516, -5.58650713, -2.34604603,
-0.56767793, 0. ,
-0.60034598, -2.41427014,
-5.7042726 ,-11.75411924,-48.7906044 ,
-11.51244516, -5.58650713, -2.34604603, -0.56767793,
0. ,
-0.60034598, -2.41427014, -5.7042726 ,-11.75411924,]
polar(angteta,voltagedb)

show()

Aug 16 '07 #1
5 963
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
You posted this question several times now and got no response that you
liked enough to abstain from reposting.

- Try another forum (the matplotlib mailing list would be a good candidate)
- Show some initiative: add 50 to the dB values and be done
here is the program
[...]
voltagedb = [-48.7906044 ,-11.51244516, -5.58650713, -2.34604603,
-0.56767793, 0. ,
-0.60034598, -2.41427014,
-5.7042726 ,-11.75411924,-48.7906044 ,
-11.51244516, -5.58650713, -2.34604603, -0.56767793,
0. ,
-0.60034598, -2.41427014, -5.7042726 ,-11.75411924,]
voltagedb = [v+50 for v in voltagedb]
polar(angteta,voltagedb)

show()
Good luck,
Peter
Aug 16 '07 #2
Peter Otten wrote:
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

You posted this question several times now and got no response that you
liked enough to abstain from reposting.

- Try another forum (the matplotlib mailing list would be a good candidate)
- Show some initiative: add 50 to the dB values and be done
> here is the program

[...]
>voltagedb = [-48.7906044 ,-11.51244516, -5.58650713, -2.34604603,
-0.56767793, 0. ,
-0.60034598, -2.41427014,
-5.7042726 ,-11.75411924,-48.7906044 ,
-11.51244516, -5.58650713, -2.34604603, -0.56767793,
0. ,
-0.60034598, -2.41427014, -5.7042726 ,-11.75411924,]

voltagedb = [v+50 for v in voltagedb]
>polar(angteta,voltagedb)

show()
The better the advice the worse it's wasted ...

I might ask just exactly what is being plotted to give those answers. It
sounds like field strength, but I am having difficulty envisaging a
field that is weakest at its center - is this some sort of alternative
universe you are plotting :-) ?

regards
Steve
--
Steve Holden +1 571 484 6266 +1 800 494 3119
Holden Web LLC/Ltd http://www.holdenweb.com
Skype: holdenweb http://del.icio.us/steve.holden
--------------- Asciimercial ------------------
Get on the web: Blog, lens and tag the Internet
Many services currently offer free registration
----------- Thank You for Reading -------------

Aug 16 '07 #3
On Aug 16, 9:48 am, yadin <conra2...@yahoo.comwrote:
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
Aug 16 '07 #4
Steve Holden wrote:
I might ask just exactly what is being plotted to give those answers. It
sounds like field strength, but I am having difficulty envisaging a
field that is weakest at its center - is this some sort of alternative
universe you are plotting :-) ?
I believe the OP is trying to plot a radiation pattern like Figure 4.5 on
the following page:

http://www.vias.org/wirelessnetw/wndw_06_05_05.html

Peter
Aug 16 '07 #5
Peter Otten wrote:
Steve Holden wrote:
>I might ask just exactly what is being plotted to give those answers. It
sounds like field strength, but I am having difficulty envisaging a
field that is weakest at its center - is this some sort of alternative
universe you are plotting :-) ?

I believe the OP is trying to plot a radiation pattern like Figure 4.5 on
the following page:

http://www.vias.org/wirelessnetw/wndw_06_05_05.html
Right, it's a relative field strength plot. Now I see. Thanks.

regards
Steve
--
Steve Holden +1 571 484 6266 +1 800 494 3119
Holden Web LLC/Ltd http://www.holdenweb.com
Skype: holdenweb http://del.icio.us/steve.holden
--------------- Asciimercial ------------------
Get on the web: Blog, lens and tag the Internet
Many services currently offer free registration
----------- Thank You for Reading -------------

Aug 16 '07 #6

### This discussion thread is closed

Replies have been disabled for this discussion.