Velocity Reviews > Plot problem.. ?? No sign at all

# 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

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

Cheers

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

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

Regards

Johan