Subroutine PLT


Next: The QDP program Up: Fortran interface Previous: Subroutine RDQDP

Subroutine PLT

The calling sequence for the PLT subroutine is:

      SUBROUTINE PLT(Y, IERY, MXROW, NPTS, NVEC, CMD, NCMD, IER)
      REAL      Y(*)
      INTEGER   IERY(*), MXROW, NPTS, NVEC, NCMD, IER
      CHARACTER CMD(*)*(*)
C---
C General plot subroutine.
C---
C Y(*)      I    The data array.  The array should be dimensioned
C                Y(MXROW,MXCOL) where MXROW and MXCOL are the actual
C                sizes of the arrays in the calling program.
C                MXCOL=NVEC+NSERR+2*NTERR  where NSERR is the number
C                of vectors that have symmetric errors and NTERR
C                is the number of vectors that have two-sided errors.
C IERY(*)   I    =-1 plot errors as SQRT(Y)
C                = 0 no errors.
C                =+1 explicit symmetric errors.
C                =+2 for two-sided errors
C MXROW     I    The actual first dimension of the Y array.
C NPTS      I    The number of points to plot (NPTS<=MXROW).
C NVEC      I    The number of vectors to be plotted.
C CMD(*)    I    Array of commands.
C NCMD      I    Number of commands.
C IER         O  Error flag, =-1 if user entered EOF, =0 otherwise.

It is important to remember that the variable NVEC does not refer to the number of columns of data but rather the number of vectors. Each vector must have one entry in the IERY array that describes the type of error on that vector. Depending on the type of error, each vector can be composed of one, two, or three columns of data. To calculate the number of columns needed by the vectors, let NSERR be the number of vectors with symmetric errors (IERY(I)=1) and NTERR the number with two sided errors (IERY(I)=2). The total number of columns MXCOL will be given by MXCOL=NVEC+NSERR+2*NTERR.

The variable MXROW contains the physical first dimension of the Y array. Thus the calling program should dimension Y to be (MXROW,MXCOL) or the Fortran equivalent (MXROW*MXCOL). The variable NPTS contains the number of rows that contain valid data. All rows from NPTS+1 to MXROW will be ignored. When PLT starts it will execute NCMD lines from the CMD array. Any valid PLT command can be entered into this array. For example, one line could contain a reference to an indirect command file, and this would cause PLT to execute all commands found in this file. If the command list contains the EXit command, then PLT will exit when this command executes and any commands following the EXit will be ignored. Since PLT does not actually plot any data until all the commands are executed, it is a good idea to precede an EXit with a Plot command, since that will force a plot to be produced.

If PLT exits normally, i.e., with the the EXit command, then IER is set to zero. If the user enters an end-of-file then PLT exits with IER<0.



next up previous contents
Next: The QDP program Up: Fortran interface Previous: Subroutine RDQDP



Web Page Maintained by: Dr. Lawrence E. Brown elwin@redshift.gsfc.nasa.gov