FFRAME procedure
Forms multiple windows in a plot-matrix for high-resolution graphics (P.W. Goedhart).
Options
Parameters
Description
Procedure FFRAME supplements the FRAME directive with automatic definition of windows in a so-called plot-matrix. The ARRANGEMENT option defines the arrangement of the plot-matrix which can be in either a rectangle, square, lowersymmetric, uppersymmetric or diagonal. The number of rows and columns of the plot-matrix can be specified by options ROWS and COLUMNS. The COLUMNS option is only relevant when ARRANGEMENT=rectangle. The DIAGONALWINDOWS option defines whether or not the diagonal windows should be included for symmetric plot-matrices. The option setting SQUARESHAPES=yes forces each window, excluding margins for annotation, to be square.
By default the positions of the windows in the plot-matrix are defined within the procedure by means of a FRAME statement using windows 1, 2, ... . The windows are numbered by rows unless the NUMBERING option is set to columnwise. When the number of windows is larger than the maximum allowable number, the windows are not defined and a warning message is printed. In that case the parameters SYLOWER, SYUPPER, SXLOWER and SXUPPER can be used to save the y and x device coordinates of the windows for subsequent use in a FRAME statement. Also, setting DEFINE=no does not define the windows. The NGRAPHS parameter saves the number of windows in the plot-matrix.
Typically the screen should be cleared only for the first window in a plot-matrix. The SSCREEN parameter can be used to save the single-valued text 'clear' for the first window and 'keep' for all other windows. These texts can then be used to set the SCREEN option of the plot directives as is shown in the example. The CLEARWINDOW option can be employed in case the screen should be cleared for other windows.
By default the unit plot-square [0,1] x [0,1] is employed. Options RLOWER, RUPPER, CLOWER and CUPPER can be used to define a different plot-square. The RSKIP and CSKIP options can be used to increase the space between windows which is by default 0. The user must ensure that these options are set to sensible values.
The space used for labelling of axis and an overall title for each window can be controlled with options MARGIN, YMLOWER, YMUPPER, XMLOWER and XMUPPER options. Default values of these options ensure that an overall title and labels (not longer than 4 characters) along both axes are displayed when using the standard character size. However, the default values normally prohibit the display of titles along the axes. The settings xtitle and/or ytitle of the MARGIN option generate space for titles along the axes. The MARGIN option can have the following settings:
These values can be overridden by setting options YMLOWER, YMUPPER, XMLOWER, XMUPPER explicitly. The background colour for all windows may be modified by the BACKGROUND option.
The PRINT option can be used to display the layout and numbering of the plot-matrix in a table or in a high-resolution test-graph on the current device.
Options: PRINT, ARRANGEMENT, ROWS, COLUMNS, DIAGONALWINDOWS, SQUARESHAPES, NUMBERING, DEFINE, CLEARWINDOW, RLOWER, RUPPER, CLOWER, CUPPER, RSKIP, CSKIP, MARGIN, YMLOWER, YMUPPER, XMLOWER, XMUPPER, BACKGROUND.
Parameters: NGRAPHS, SYLOWER, SYUPPER, SXLOWER, SXUPPER, SSCREEN.
Method
The relevant part of the calculations for the lower and upper x device coordinates are
CALCULATE xrange = (CUPPER - CLOWER + CSKIP)/COLUMNS - CSKIP
CALCULATE XLOWER = CLOWER + (!(1...#COLUMNS) - 1)\
* (xrange + CSKIP)
CALCULATE XUPPER = XLOWER + xrange
The y device coordinates are calculated similarly.
Action with
RESTRICT
Restrictions on CLEARWINDOW are ignored.