next up previous contents index
Next: MASTER Routine Color Up: MASTER Routine Examples Previous: Adding Additional Annotation

Using Multiple MASTER Routines in the Same Program

 

The following is an  example of how to use several MASTER subroutines in the same program. (see also the program PLOTTESTS) The basic idea is to use the first call to a MASTER routine to initialize the LONGLIB graphics library. On later calls to MASTER routines you must use "iflag" to instruct the routine NOT to re-initialize LONGLIB. The last call to a MASTER routine closes LONGLIB.    

C FIRST CALL TO MASTER ROUTINE, SET -10000 < iflag < 0
C TO INITIALIZE LONGLIB BUT NOT CLOSE IT
C SET iflag TO PROMPT FOR SCREEN DEVICE TYPE WITH
C AXIS ON TOP AND SIDES AND NO GRID
       CALL PLOTSC(X,Y,N,-1,...) 
       ...
C SECOND CALL TO MASTER ROUTINE, SET iflag < -10000 TO
C PREVENT INITIALIZING LONGLIB OR CLOSING IT
C SET iflag TO PRODUCE AXIS TICKED GRID (SINCE
C LONGLIB OPEN, NO PROMPT FOR SCREEN DEVICE)
       CALL PLOTSC(X,Y,N,-10004,...)
       ...
C LAST CALL TO MASTER ROUTINE, SET iflag > 10000 TO
C PREVENT INITIALIZING LONGLIB AND CLOSE IT AFTER PLOTTING
C SET iflag TO PRODUCE AXIS TICKED GRID AND LOG/LOG FORM
C (SINCE LONGLIB OPEN, NO PROMPT FOR SCREEN DEVICE)
       CALL PLOTLG(X,Y,N,10053,...)



David Long
Wed Jun 12 10:34:11 MDT 1996