Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Plot problem.. ?? No sign at all

Reply
Thread Tools

Plot problem.. ?? No sign at all

 
 
Ritchy lelis
Guest
Posts: n/a
 
      07-13-2010
On 11 Jul, 13:28, Johan Grönqvist <(E-Mail Removed)> wrote:
> 2010-07-11 02:12, Ritchy lelis skrev:
>
> > On 7 jul, 08:38, Johan Grönqvist<(E-Mail Removed)> *wrote:

>
> > About the plot draw it's a curve that it's a set of points wich it's
> > the result of the comput of the Vref and Vi together. I don't know if
> > i had to make a break instruction (like in other's languages) after
> > the "If" instructions if i want the else-condition to be executed? ...
> > (do you have some sujestions?)

>
> I would have expected a code structure similar to this:
>
> (NOTE: This is a very inefficient solution, and not the one suggested
> earlier, but it is closer to the code snippet you posted originally, and
> it does produce a plot.)
>
> ----------------------
> import numpy as np
> import matplotlib.pyplot as plt
> Vref = np.linspace(1,20, 100)
> Vi = np.linspace(1,10,100)
>
> for ref in Vref: # Loop over Vref and Vi
> * * *for i in Vi:
> * * * * *if *i > ref/4: # Compute V0
> * * * * * * *V0 = 2*i-ref
> * * * * *elif (-ref/4) <= ref and ref <= ref/4:
> * * * * * * *V0 = 2*i
> * * * * *elif i < -ref/4:
> * * * * * * *V0 = 2*i+ref
> * * * * *plt.plot(i, V0, ".") # Plot one single point at x = i, y = V0
> plt.show() # Display the plot in a window
> ----------------------
>
> > Anyway i have a picture of a tuturial that i found but in this forum i
> > can't post it. That pic would show what a really want...

>
> Can you give a link?
>
>
>
> > Relatively to the axis, the Vi takes the x-axis and the Vref takes the
> > y-axis.

>
> To me this sound like you want to make a 3D-plot, as there is the
> x-axis, the y-axis, and V0. Is this correct? Is V0 on a z-axis?
>
>
>
> > As i said, i have a good 2 pic of a doc that has the information about
> > this ADC that i'm developing.

>
> I looked on wikipedia
> <http://en.wikipedia.org/wiki/Analog-to-digital_converter>, and saw some
> figures. Is any of those similar to what you look for?
>
> I see that they have (Vi - Vref) on the x-axis, and the computed value
> on the y-axis.
>
> Regards
>
> Johan


hi

This is how looks like the flash residue transference function that i
was talking about...

http://www.iadc.ca/Imran_ADC_tutoria...s/image048.gif

I'm suposed to obtain a figure like that in my plot.

Somebody help me please.

Cheers
 
Reply With Quote
 
 
 
 
Johan Grönqvist
Guest
Posts: n/a
 
      07-16-2010
Hi Ritchy,

This is the first time I am doing this, but it's a standard response
given on lists like this.

2010-07-13 18:17, Ritchy lelis skrev:
> This is how looks like the flash residue transference function that i
> was talking about...
>
> http://www.iadc.ca/Imran_ADC_tutoria...s/image048.gif
>
> I'm suposed to obtain a figure like that in my plot.
>


From the hints you have been given, and your answers to those hints, my
conclusion is that the issue is not with the programming, but with your
understanding of the problem.

I get the feeling you do not understand what you are trying to do, and
therefore our programming hints do not help you.

Based on the "we will not do your homework"-principle, I will therefore
not read up on your theory, and therefore not produce your plot for you.
That will not change until you show better understanding for the plot
you are trying to generate.

Regards

Johan

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
$ sign to gb pound sign PWB Computer Support 6 02-19-2007 03:06 AM
Automatic sign-up and sign-in across different domains without cookies? Jimmy ASP .Net 1 11-21-2006 04:41 PM
Automatic sign-up and sign-in between different domains without cookies? Jimmy Javascript 3 11-20-2006 01:28 PM
J sign instead of ? sign Harold Potter esq. Computer Support 5 04-16-2005 02:19 PM
Variable size plot symbols, variable hue plot colors in Python (MatPlotLib) ? Dr. Colombes Python 1 02-10-2005 08:49 PM



Advertisments