One of the ROWVAR= or
COLUMNVAR= arguments is required. Both can be specified. Each specifies
a single classification variable. Any one of the following uses is
valid:
LAYOUT DATALATTICE ROWVAR=class-var
LAYOUT
DATALATTICE COLUMNVAR=class-var
LAYOUT
DATALATTICE ROWVAR=class-var COLUMNVAR=class-var
If you do not explicitly
manage columns and rows using the
COLUMNS= and
ROWS= options, the default layout behavior
is as follows:
-
If both ROWVAR= and COLUMNVAR=
are specified, a data cell is created for each of the value pairings
that are possible for the classification values of the specified variables.
If the ROWVAR variable has R distinct values and the COLUMNVAR variable
has C distinct values, the dimension of grid produced is R x C.
-
If only the ROWVAR variable is
used, an R x 1 grid is produced.
-
If only the COLUMNVAR variable
is used, a 1 x C grid is produced.
If the class variable
is of type character, its values are returned in data order. To control
the ordering of the values, you can sort the input data by the classification
variables. If the class variable is of type numeric, the values are
displayed in ordinal order.
Formats can be assigned
to class variables to create classification levels (for example, an
AGEGROUPFMT. format for numeric AGE). In this case, the classification
is performed after the format is applied. For numeric data, the order
is ordinal, based on the first value in each class.
Use the
INCLUDEMISSINGCLASS option to control whether cells are
displayed when any value crossing contains a missing value.
The output
size does not grow automatically as the number of cells increases.
To set a panel size for the current template, use the DESIGNHEIGHT=
and DESIGNWIDTH= options in the BEGINGRAPH statement. To set a panel
size for all templates in the current SAS session, use the HEIGHT=
and WIDTH= options in the ODS GRAPHICS statement. Size settings in
the ODS GRAPHICS statement override size settings in the BEGINGRAPH
statement. The default output width is 640px, and the default output
height is 480px.
As the number of cells
in the grid increases, the size of each cell decreases. At some point
the cells might become so small that a meaningful graph cannot be
rendered. The
CELLHEIGHTMIN= and
CELLWIDTHMIN= options set a threshold for the smallest
cell. If the actual cell height or width becomes smaller, no panel
is drawn. The default minimum cell size is CELLHEIGHTMIN=100px and
CELLWIDTHMIN=100px.
Using the default panel
size and cell size, the DATALATTICE layout accommodates a grid of
about 24 cells (6 columns by 4 rows). If you know that the number
of cells is larger, you should increase the overall panel size, or
decrease the minimum cell size, or both. You can also use
ROWS=,
COLUMNS=, and
PANELNUMBER= options to partition your data so
that a number of smaller grids are produced that cumulatively show
all of the value crossings.