next up previous contents index
Next: SUBROUTINE PPEN Up: Description of Plotting Previous: SUBROUTINE PLT3D

SUBROUTINE PPLOT

 PPLOT is the central routine for controlling the plotting of lines to the LONGLIB metafile package. PPLOT is called by the  PLOT routine but can be called separately. Any call to PPLOT when the metafile package is not initialized is a dummy call. Options for PPLOT are similar to PLOT (see documentation on PLOT). An attempt to make the viewport bigger than the metafile plotting window will force the viewport to be the size of the metafile plotting window (this is the default). The metafile plotting window is 56.5 by 56.5 inches with the lower left corner at (0,0) and the upper right corner at (56.5,56.5). Since most hardcopy devices can not produce such a large output page, the LONGLIB metafile processor programs which convert the metafile to an output file, "strips" the metafile window into separate, overlapping output pages. Only non-blank page strips are output to the device.

The transformation from an input point (x,y) in plot units to an output point (nx,ny) in metafile storage units (ignoring clipping) is:

    nx = (z * (x * cos( a ) - y * sin( a )) + ox) / rx
    nx = (z * (x * sin( a ) + y * cos( a )) + oy) / ry

where

    a is the relative plotting angle (expressed in radians)
    z is the zoom scale factor
    ox,oy is the scaled, rotated relative origin
    rx,ry is the metafile resolution for each axis (inches/res unit)
(see WHEREPR)
  The relative plotting angle a is updated according to:
    anew = aold + ain
and the relative origin (ox,oy) is updated according to:
    oxnew = z * (xin * cos( a ) - yin * sin( a )) + oxold
    oynew = z * (xin * sin( a ) + yin * cos( a )) + oyold
CALL PPLOT (x,y,i)

x,y   (R): coordinate values
i     (I): plot function parameter
           =  0: line color control
                  x is the new line color
                  if x >= 0 then plotting angle becomes y
           =  2: draw to (x,y) with 'pen down'
           = -2: same as i=2. (x,y) becomes new origin
           =  3: move to (x,y) with 'pen up'
           = -3: same as i=3. (x,y) becomes new origin
           =  4: upper right corner of viewport set to (x,y)
           = -4: lower left corner of viewport set to (x,y)
           =  5: pick pen up at last point
           =  9: erase to (x,y)
           = -9: erase to (x,y), (x,y) becomes new origin
           = 10: issue change page command to metafile
           = 11: end plot (close metafile package)
           =999: end plot (close metafile package)



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