PLOT Y(X)=<function of X> or PLOT X(T)=f(T),Y(T)=g(T)
plots a family of curves when the function(s) include parameters
whose values are given in the edit field in the form
<name of parameter>=<initial value>,<final value>,<step>.
Several varying parameters may occur simultaneously.
For example,
PLOT X(t)=A*cos(t),Y(t)=B*sin(t) / A=1,10,1 B=1,10,1 t=0,6.283,0.2
plots a curve family consisting of 10*10=100 different ellipses.
Using data values as varying parameters:
Parameters can take their values from variables of a Survo data set, say
TEST. Such parameters, say A and B, are given in the form
A=DATA:TEST,Result1
B=DATA:TEST,Result2[-2] (Result2 is lagged by 2.)
Then a curve for each active observation in TEST is plotted using
values of variable Result1 in data TEST as parameter A and similarly
values of variable Result2 (lagged by 2) in data TEST as parameter B.
Only one data set can be used in one PLOT scheme at a time.
All other varying parameters like C=0,10,1 can be used in combination
with data-dependent parameters.
................................................................................
Example 1: Circles with radius from Fibonacci sequence (DATA R):
DATA R: 1 2 3 5 8 13 21 34 55 END
GPLOT X(T)=R*COS(T),Y(T)=R*SIN(T)
R=DATA:R,R
SCALE=-60,60 SIZE=465,349 T=0,2*pi,pi/40 pi=3.141592653589793
................................................................................
Example 2: Olympic rings (See how the correct overlapping is achieved)
DATA OLYMPIC
A B C D E Comments
-2 0 9 1 0 Blue A: X coord of the center
0 0 0 1 0 Black B: Y coord of the center
2 0 13 1 0 Red C: Color
-1 -1 5 1 0 Yellow D: Length of the arc
1 -1 10 1 0 Green E: Start angle of the arc
-2 0 9 0.1 -0.2 Blue over yellow
0 0 0 0.1 4 Black over yellow
0 0 0 0.1 -0.2 Black over green
2 0 13 0.1 4 Red over green
GPLOT X(T)=A+R*COS(D*T+E),Y(T)=B+R*SIN(D*T+E)
R=0.90 Radius of the circles
T=[line_width(7)],0,2*pi,pi/20 pi=3.141592653589793
A=DATA:OLYMPIC,A B=DATA:OLYMPIC,B D=DATA:OLYMPIC,D E=DATA:OLYMPIC,E
XSCALE=-3,3 YSCALE=-2,1 SIZE=600,300 HOME=0,100 MODE=VGA
COLOR_CHANGE=C C=DATA:OLYMPIC,C FRAME=0 XDIV=0,1,0 YDIV=0,1,0 HEADER=
................................................................................
Messages in plotting families of curves (screen graphics):
Especially in cases of data-dependent parameters it is useful to display
certain functions of parameters while plotting. This is possible by
using a MESSAGES specification. It has the form
MESSAGES=<list_of_message_names> where each member is a specification
of the form <member>=<function_of_parameters>,n,x,y indicating that
this message (value of the function) is to be displayed from the
position (x,y) onwards for curves nos. n,2n,3n,4n,...
................................................................................
Example:
GPLOT X(T)=R*COS(T)+A,Y(T)=R*SIN(T)
R=1,20,1 A=1,10,1
SCALE=-30,30 SIZE=465,349 T=0,2*pi,pi/40 pi=3.141592653589793
MESSAGES=M1,M2 M1=R,20,520,330 M2=A,20,520,310
................................................................................
More extensive examples on data-dependent parameters and messages in
plotting of curve families are provided in sucros /BUFFON and /CONFMEAN.
C = More information on curve plotting