7.2.2 Scaling Routines

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.