Plot problem.. ?? No sign at all

Johan Grönqvist johan.gronqvist at gmail.com
Wed Jul 7 03:38:21 EDT 2010


2010-07-06 19:18, Ritchy lelis skrev:
> On 6 jul, 17:29, Alan G Isaac<alan.is... at gmail.com>  wrote:
>> Unfortunately I cannot make sense of the code you posted.
>> Provide a detailed description in words (or psuedocode)
>> of what you are trying to accomplish.  Be very careful
>> and detailed is you want a useful response.
>>
>> Alan Isaac
>
> hummm...
>
> ok, i will try to make that detailed description.

I can tell you why I do not understand from your posted code what you 
are trying to do.

Firstly, I do not understand if you are trying to plot a surface, a set 
of curves, or a curve, or just a set of points? In your posted code, the 
plot command is part of the else clause, and my guess is that you never 
intend the else-clause to be executed at all.

In your code snippet you loop over two arrays (Vi and Vref), compute a 
scalar value V0, and all plot-commands you issue are of the form 
plot(V0). This will probably draw a line of one point (for each value in 
Vi and Vref), which may not be what you want, and if it draws anything 
at all, then all points will be drawn at the same x-value, which is also 
probably not what you want.

Secondly, how are the Vi and Vref related to your axes? I assume you 
want to plot all values you compute for V0, but as a function of what? 
When I use the plot command, I usually give it (at least) two arguments, 
where the first is the x-axis, and the second is the y-axis.

After I have understood those things, the next question would be about 
the maths relating the Vi and Vref values to the V0 values, but I do not 
think I will understand those until after the above points are explained 
clearer.

I definitely think your english is not a problem here.



Johan




More information about the Python-list mailing list