The LAYOUT LATTICE statement
creates a grid of graphs that automatically aligns plot areas, data
display areas, axis labels, and headers across the columns and rows
of the layout. The axis data ranges can be scaled, and the axes for
individual cells in the layout can be managed by row and by column
using COLUMNAXIS and ROWAXIS statements. COLUMNAXIS statements are
used within a COLUMNAXES or COLUMN2AXES block to externalize column
axes for the layout. Similarly, ROWAXIS statements are used within
a ROWAXES or ROW2AXES block to externalize row axes for the layout.
Each axis block is used to manage the primary axis. The axis that
is considered primary depends on the settings for the XAXIS= and YAXIS=
options in plot statements that are specified within the layout:
For the specifications
to take effect,
-
UNION or UNIONALL data scaling
must be set for the affected columns and rows. The data scaling is
set with the LAYOUT LATTICE statement’s COLUMNDATARANGE=, COLUMN2DATARANGE=,
ROWDATARANGE=, and ROW2DATARANGE= options.
-
Within a COLUMNAXES or COLUMN2AXES
block, one COLUMNAXIS statement should be specified for each column
that contains axes that you need to manage. Both axes blocks can contain
a COLUMNAXIS statement for the same column. For example, to manage
the axes in the first column of the layout, the COLUMNAXES block can
contain a COLUMNAXIS statement that manages the column’s X
axes. The COLUMN2AXES block can contain a COLUMNAXIS statement that
manages the column’s X2 axes.
-
Within a ROWAXES or ROW2AXES block,
one ROWAXIS statement should be specified for each row that contains
axes that you need to manage. Both axes blocks can contain a ROWAXIS
statement for the same row. For example, to manage the axes in the
first row of the layout, the ROWAXES block can contain a ROWAXIS statement
that manages the row’s Y axes. The ROW2AXES block can contain
a ROWAXIS statement that manages the column’s Y2 axes.
In addition to managing
the primary axes, you can also display “secondary” axes
in the grid. A secondary axis is not an independent axis. Rather,
it mirrors the primary axis, but it is displayed on the opposite side
and can have different display options. For example, when the X axis
(bottom) is primary, you can mirror that axis with a secondary X axis
at the top of the grid. Similarly, when the Y2 axis (right) is primary,
you can mirror that axis with a secondary Y2 axis on the left of the
grid. A secondary axis makes it easier to interpolate values in the
cells that are farthest away from the primary axis. To display a secondary
axis, use the
DISPLAYSECONDARY= option.
The following example
shows COLUMNAXIS statements for a lattice with two columns:
layout lattice / columns=2 columndatarange=union;
columnaxes;
columnaxis / griddisplay=on displaysecondary=(ticks tickvalues);
columnaxis / griddisplay=on displaysecondary=(ticks tickvalues);
endcolumnaxes;
/* rest of lattice definition */
endlayout;
COLUMNAXIS and ROWAXIS
statements are similar to the XAXISOPTS= and YAXISOPTS= options for
LAYOUT OVERLAY, with the following differences:
-
When COLUMNAXIS and ROWAXIS are
used, any axis options specified on plots within the affected columns
or rows are ignored. All axis features for the external axes must
be specified on the COLUMNAXIS or ROWAXIS statement.
-
When COLUMNAXIS and ROWAXIS are
used, any LAYOUT OVERLAYEQUATED layouts specified for cells in the
affected columns or rows are implemented as LAYOUT OVERLAY layouts.
Equated axes are not supported on external axes.
In the default cases
for each plot in the layout, the axis type is always DISCRETE, LINEAR,
or TIME. The
TYPE= option enables you to specify an
axis type that overrides the default. For example, when appropriate
for the data, you can request a LOG axis. When you override the default
axis type, you must be sure to specify the correct axis type for the
plot(s) that you are defining.
Each axis type has features
specific to that type, and the following axis options enable you to
specify features for the different types:
DISCRETEOPTS= ,
LINEAROPTS= ,
LOGOPTS= , and
TIMEOPTS= . One or more of these options can
be specified for an axis, but the specified settings are applied only
to the axis type that supports them.