A very simple example of using the MASTER routines of this library is shown below. For more detailed examples see the following sections.
This example plots a damped sine wave on both the terminal screen, the Ramtek (in color), and the LONGLIB metafile. The master routine PLOTSC handles all graphics intialization and closing. (See the chapter on MASTER routines for additional details).
DIMENSION X(100),Y(100) DATA P,U,PL,A,B,PHI/112,85,25.,.013,.3/ DATA PI/3.141593/ C FILL DATA ARRAYS DO 10 I=1,100 X(I)=I-1 Y(I)=SIN((I-1)*PI/A+PHI)*EXP(-I*B) 10 CONTINUE C CALL LONGLIB PLOTTING ROUTINE TO PLOT CURVE. C OUTPUT ONLY 35 OF THE 100 POINTS ON A 6X5 PLOT WITH TITLE C AND A GRID. iflag IS SET TO PROMPT FOR A SCREEN OUTPUT DEVICE. C NOTE THAT WHEN A MASTER ROUTINE INITIALIZES LONGLIB, A C METAFILE IS ALWAYS PRODUCED. CALL PLOTSC(X,Y,100,5,6.,5.,'X TITLE',7,'Y TITLE',7, 1 'TOP TITLE',-10) STOP END