DCL:GRPH2:USPACK: Auto-Scaling Routines: Basic Structure
The scaling routines determine the appropriate parameters for the transformation
function for the given set of data, and are routines that take the place
of GRSWND and GRSVPT. They do not make the
transformation function effective, so the function must be made effective using GRSTRF.
To determine the parameters for a transformation function, the data range for
the polyline to be drawn must be known. The USSPNT is for specifying
these data, and can be called any number of times before a call is made to
USPFIT. For example, to draw multiple polylines in a single plot,
all data for the polylines must be given. The USPFIT takes the maximum
and minimum values of these data and rounds the values to a convenient value for
setting an appropriate window. When the window is explicitly specified by the user
using routines such as GRSWND/SGSWND or SGpGET/SGpSET,
the user-defined window will be given priority.
The viewport is set to a size with margin widths proportional to the
character size (the internal variable 'RSIZEL1' handled by UZpGET/UZpSET)
based on the maximum available frame area, so that all of the characters for the
coordinate axes drawn by the USPACK can be included in the viewport. Therefore,
when the character size of the label is changed using routines such as UZFACT,
or when the internal variable 'LFULL' handled by GpGET/SGpSET
is set to .TRUE., the plot size also changes. When the viewport
is explicitly set by GRSVPT/SGSVPT or SGpSET, SGpSTX,
these values will be given priority.