473,395 Members | 1,689 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

ploting issues in program

hi every one!

can you please help me to fix these polar plot in db's
so that the center is at the minimun negative number in voltagedb
about [-50]
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 997
yadin wrote:
can you please help me to fix these polar plot in db's
so that the center is at the minimun negative number in voltagedb
about [-50]
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.

Now your options are:

- 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:
yadin wrote:
>can you please help me to fix these polar plot in db's
so that the center is at the minimun negative number in voltagedb
about [-50]
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.

Now your options are:

- 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!

can you please help me to fix these polar plot in db's
so that the center is at the minimun negative number in voltagedb
about [-50]
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Tom Loredo | last post by:
Hi folks- I'm about to move from a Solaris 8/SPARC environment to a Dell running RedHat 9. Are there any issues I need to be aware of in bringing my Python code over (mostly scientific...
3
by: Phil IU Guy | last post by:
I am having 2 issues, both acting very randomly, and for the most part I dont get this message on most computers, but I have had a couple computers get either issue 1, or issue 2. Issue #1: I...
4
by: Martin | last post by:
I am using graphics as backgrounds for forms,buttons,labels etc. The question is: is it faster to load all graphics from files on app start or to use it embeded (places in editor during design)....
1
by: J | last post by:
I am having issues with a VBA in a rockwell program called RSView SE. (Industral touch panel software.) I know that most of you ppls dont deal with this program, but I was hoping you might be...
2
by: et | last post by:
In my asp.net 1 program, I have a business layer, which lays out all my business rules, and of course communicates with the data layer, which accesses a sql database and returns data. No problems....
4
by: Viviana Vc | last post by:
Hi all, I've read the WindowsVistaUACDevReqs.doc documentation and I have done different small tests on Vista to understand the bahaviour and now I have a few questions. 1) If I create a...
14
by: Stephany Young | last post by:
Even though I had my roots and highlights redone just a few days ago, I don't understand why I appear to be having an ongoing blond moment. Is it just me or do others among you not 'get' how to...
5
by: Alexnb | last post by:
Hello I am sure most of you are familiar with py2exe. I am having a bit of a problem. See the program has a few pictures involved and the .ico it uses for the windows. However, the pictures are...
7
by: serave | last post by:
Hi i'm new in this group. I need some help with php. I need to draw any mathematical function i get through a form? Please help me
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.