The LAYOUT
LATTICE statement creates a grid of graphs that are aligned across
columns and rows. For plot statements that are specified in the layout
block or nested in a LAYOUT OVERLAY statement, the LATTICE layout
automatically aligns the plot areas and tick display areas in the
plots.
Note: To achieve
the alignment, the LATTICE layout automatically aligns plot areas
and tick display areas across columns and rows. Also, it overrides
axis-offset settings on the OVERLAY layouts that you specify in those
columns and rows. (For details about offsets and the tick display
area,
see Adjusting Axis Offsets.) If you do not want this alignment, you might use LAYOUT
GRIDDED instead. For example, if you have a heterogeneous panel of
graphs, such as a mix of scatter plots, box plots, bar charts, or
other types of graphs, you might consider using LAYOUT GRIDDED rather
than LAYOUT LATTICE.
The layout
can unify the scale of the data ranges that are displayed in the plots,
based on the values set for the
COLUMNDATARANGE and
ROWDATARANGE= options. The data ranges can be scaled
separately for each column, for each row, or for both. Or they can
be scaled across all columns, all rows, or all of both.
When the
data-range scales are unified, you can simplify the layout by displaying
only the external axes that apply to all of the graphs across the
corresponding columns or rows. See
Axis Statements for more details.
The following
figure shows the parts of the Lattice layout with the default axis
display (internal axes are displayed).
This next
figure shows the parts of the Lattice layout when the graph display
is simplified so that only external axes are displayed.
The columns
and rows can be separated by areas called “gutters,”
which are controlled by the
COLUMNGUTTER= and
ROWGUTTER= options. In addition, the
COLUMNWEIGHTS= and
ROWWEIGHTS= options can be used to allocate a
proportion of available space to each row and column.
The LATTICE
layout automatically decides how much area to allocate to cell contents:
-
text items have a fixed size based
on the amount of text and the font properties
-
graphs take up the remaining space.
The layout’s
grid size is determined by the
COLUMNS= and
ROWS= options.
By default,
the results of the
GTL-statements are placed into the grid sequentially from left to right, wrapping
to a new row each time the current row is filled. You can use the
ORDER= option to fill cells from top to bottom down
a column. In that case, the layout cells wrap to a new column each
time the current column is filled.