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 block to externalize column
axes for the layout. Similarly, ROWAXIS statements are used within
a ROWAXES block to externalize row axes for 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 COLUMNDATARANGE= and ROWDATARANGE= options.
-
Within the COLUMNAXES block, the
number of COLUMNAXIS statements must match the number of columns.
Within the ROWAXES block, the number of ROWAXIS statements must match
the number of rows. If you do not specify enough of either statement,
the last statement is used on remaining cells. If you specify too
many statements, the extra statements are ignored.
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:
-
COLUMNAXIS and ROWAXIS specify
a secondary axis by using the DISPLAYSECONDARY= option, which shows
a secondary axis on the opposite side of the lattice.
-
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.