FRAME directive
Defines the positions of windows within the frame of a high-resolution graph. The positions are defined in normalized device coordinates ([0,1]×[0,1]).
Options
Parameters
Description
You can define up to 32 different windows in which to plot graphics. Each window is a rectangular area of the screen which is defined using normalized device coordinates (NDC). These have a range from 0.0 to 1.0 in both Y and X directions, thus defining a square which represents the available plotting area on any device. The mapping from NDC to physical coordinates on the current output device is performed internally, so the window definitions are independent of the choice of device. The actual size of a particular window on different devices will vary according to their relative physical sizes. The NDC system used for window definition is also completely independent of the values of the data that are to be plotted.
When you use FRAME, any aspects of the windows that you do not specify explicitly retain the values that they had immediately before the FRAME statement. Alternatively, you can specify option RESET=yes to reset all these aspects to the default values, defined by GenStat at the start of each job.
To define a window, the upper and lower bounds are required in both y- and x-directions; thus defining both the position and the size of the window. For example
FRAME WINDOW=1; YLOWER=0.25; YUPPER=0.75;\
XLOWER=0; XUPPER=0.5
defines window 1 to be a square of size 0.5, whose bottom left corner is at the point (0.0,0.25) and whose top right corner is (0.5,0.75). This does not define the exact size of a graph plotted in this window, as margins may be required for the annotation and titles (see below).
If you do not specify all four values in the FRAME statement, the existing values are retained. A check is then made on the validity of the window bounds. The settings of YLOWER and XLOWER must be strictly less than those of YUPPER and XUPPER respectively; also, none of the bounds can be outside the permitted range, which is [0.0,1.0] on most graphics devices. You cannot use * to reset a bound to the default value; if you try to do so, GenStat will produce an error diagnostic. (Instead you can specify option RESET=yes, as explained above.)
All the windows have a default size defined when you start GenStat. Window 1 is the default window used for plots by DGRAPH, DCONTOUR, and so on, and is set up to be a square of size 0.75. The default key window is window 2, which is a rectangle of height 0.25 and width 0.75 located immediately below window 1. Windows 3 and 4 are the unit square [0,1]×[0,1] and windows 5, 6, 7 and 8 are the top-left, top-right, bottom-left, and bottom-right quarters respectively of the unit square. The remaining windows, from 9 up to 32, also default to the unit square. You can use FRAME to modify the size or position of any of these windows.
Usually, a margin is provided around each plot so that there is room for the axes to be drawn, along with labelling and titles as specified by the XAXIS or YAXIS directives. By default, the margin size is designed to allow sufficient room for annotation to be added using the standard character size, as described in the SIZE parameter of PEN. If you use XAXIS or YAXIS to control the plotting of axes explicitly you may wish to alter the size of the margins, either to increase the space used for the axes or, alternatively, to maximize the space available for the graph itself. For example, if you alter the size of the labelling, by explicitly defining the relevant axis pens, more space may be required for the axes; otherwise the labels may be clipped at the window bounds. The parameters YMLOWER, YMUPPER, XMLOWER and XMUPPER can be used to set the space (in NDC) for the bottom, top, left-hand and right-hand margins respectively, and have initial default settings of 0.10, 0.07, 0.12 and 0.05.
On some output devices, mainly colour graphic screens, the background colour for the window may be modified by setting the BACKGROUND parameter.
The PENTITLE and PENKEY options allow you to define the pens to be used to write the overall title and the key in each window; the initial default is to use pen -5 and -6 respectively. The TPOSITION parameter can be used to specify the position of the title in each window: either left-justified, right-justified or centred. The intial default is that it is centred.
The GRID option allows you to request grid lines to be drawn in particular directions and planes (for all the windows listed by the WINDOW parameter). For example the setting xy requests lines in the xy plane running from the x-axis (that is, parallel to the y-axis), and the setting yx requests lines in the xy plane running from the y-axis (that is, parallel to the x-axis); so you can set both of these to obtain box markings in the xy plane. The PENGRID parameter specifies the pen to be used for the grid lines in each window; the initial default is to use pen -4. You must use the RESET option if you want to restore these pen numbers to the initial defaults. (GenStat does not allow you to set negative pen numbers explicitly.) The BOX parameter allows you to put a box around the window in plots other than surface plots; the initial default is to omit this. The box for a surface plot is controlled by the BOXSURFACE option, and can either be a full box enclosing the whole graph, or a bounded box enclosing just the surface; the initial default is that no box is drawn. The BOXKEY parameter can request that either a full or a bounded box be drawn around each key; the initial default is to omit the box.
The SCALING parameter enables you to request that scaling of the x-, y- or z-axes should be equal in each window. For example, the xyequal setting ensures that the x- and y-axes are scaled identically, the setting xyzequal ensures that all the axes have the same scaling, and so on.
The current FRAME settings for a particular window can be saved in a pointer supplied by the SAVE parameter. The elements of the pointer are labelled to identify the components.
Options: GRID, RESET.
Parameters: WINDOW, YLOWER, YUPPER, XLOWER, XUPPER, YMLOWER, YMUPPER, XMLOWER, XMUPPER, BACKGROUND, BOX, BOXSURFACE, BOXKEY, PENTITLE, PENKEY, PENGRID, TPOSITION, SCALING, SAVE.