|
From: Cecilia Di C. <cd...@es...> - 2006-03-01 14:34:37
|
Hi,
I've just started to use Gnuplot-py, and I'm having some trouble in =
plotting circles...
I know that to plot circles in gnuplot one has to use the parametric =
expression x=3Dsin(t) y=3Dcos(t), and then plot [0:2*pi] r*sin(t)+j, =
r*cos(t)+k, where r is the radius and (j,k) the coordinates of the =
centre...
My problem is that the radius and the coodinates of the centre are =
"python object" and gnuplot doesn't allow me to use them inside a =
gnuplot call.
To clarify:
...
for i in range (numOfCircles)
r =3D sizeOfCircle[0,i]
j =3D circlePos[:,i,0]
k =3D circlePos[:,i,1]
...
What I would like to do is
g('plot [0:2*pi] r*sin(t)+j, r*cos(t)+k')
but gnuplot-py doesn't recognise r, j and k ("undefined variable" =
error).
Can anyone help me to solve this problem?
Thanks very much,
Cecilia
Cecilia Di Chio
Department of Computer Science
University of Essex
Wivenhoe Park
Colchester CO4 3SQ, UK
phone +44 (0)1206 873111
email cd...@es...
http://privatewww.essex.ac.uk/~cdichi/
"If you have a simple idea, state it simply." (W.D. Hamilton) |