PLOTVT is the central routine for controlling the plotting of lines to the terminal screen device REF package. PLOTVT is called by the PLOT routine but can be called separately. Any call to PLOTVT when the terminal package is not initialized is a dummy call. Options for PLOTVT are similar to PLOT (see documentation on PLOT). An attempt to make the viewport bigger than the terminal screen window will force the viewport to be the size of the terminal screen window (this is the default). Typically the terminal screen window is 9.5 by either 9.5 or 7.2 inches (depending on the terminal) with the lower left corner at (0,0) and the upper right corner at (9.5,9.5).
The transformation from an input point (x,y) in plot units to an output point (nx,ny) in pixels (ignoring clipping and any axis direction reversal) 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 screen resolution for each axis (inches/pixel) (see WHEREVT)The relative plotting angle a is updated according to:
anew = aold + ainand 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 PLOTVT (x,y,i) x,y (R): coordinate values i (I): plot function parameter = 0: if x < 0 the terminal graphics screen is cleared if x = 0 set terminal to erase mode plotting if x <> 0 and x <> 999 set line color to x if x = 999 set terminal to XOR mode plotting (only if terminal has capability) = 2: draw to (x,y) with 'pen down' on terminal = -2: same as i=2. Point (x,y) becomes new origin = 3: move to (x,y) with 'pen up' on terminal = -3: same as i=3. Point (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 = 6: set relative plotting angle to x = 9: erase to (x,y) on terminal (if supported) = -9: same as i=9. Point (x,y) becomes new origin = 11: end plot (close terminal package) =999: end plot (close terminal package)