Assume you want to create
a DATAPANEL layout with one classification variable that has five
unique values. Before starting to write code, you must first decide
what grid dimensions you want to set (how many columns and rows) and
whether you want to permit empty cells in the grid. If do not want
empty cells, you must limit the grid to five cells, which gives you
two choices for the grid dimensions: five columns by one row (5x1),
or one column by five rows (1x5). If you are willing to have empty
cells in the grid, you could have several grid sizes, such as a 2x3
or a 3x2 grid.
The easiest way to specify a grid dimension is to set both the COLUMNS=
and ROWS= options to the desired number of columns and rows. If
one dimension is set, the other dimension automatically grows to accommodate
the number of classification levels. By default, COLUMNS=1, and the
ROWS= option is not set.
By default,
the layout uses the ORDER=ROWMAJOR setting to populate grid cells.
This specification essentially means "fill in all cells in the top
row (starting at the top left) and then continue to the next row below."
The following layout leaves the default ORDER=ROWMAJOR setting in
effect:
layout datapanel classvars=(var) / columns=3 rows=2 ;
layout prototype;
... plot statements ...
endlayout;
endlayout;
Alternatively, you can
specify ORDER=COLUMNMAJOR, which populates the grid by filling in
all cells in the left column (starting at the top), and then continuing
with the next column:
layout datapanel classvars=(var) / columns=3 rows=2 order=columnmajor ;
layout prototype;
... plot statements ...
endlayout;
endlayout;
One last variation is to specify START=BOTTOMLEFT which
produces the following grids, depending on the setting for the ORDER=
option:
layout datapanel classvars=(var) / columns=3 rows=2 start=bottomleft ;
layout prototype;
... plot statements ...
endlayout;
endlayout;
layout datapanel classvars=(var) / columns=3 rows=2
order=columnmajor start=bottomleft ;
layout prototype;
... plot statements ...
endlayout;
endlayout;
Note: The ROWS=, COLUMNS=, and
START= options are available on both the DATAPANEL and DATALATTICE
layouts. The ORDER= option is available only on the DATAPANEL layout.
If the number of unique
values of the classifiers exceeds the number of defined cells, you
automatically get as many separate panels as it takes to exhaust all
the classification levels (assuming that the PANELNUMBER= option is
not used). So if there are 17 classification levels and you define
a 2x3 grid, three panels are created (with different names), and the
last panel will have one empty cell. The effect that the classifier
values have on the panel display is
illustrated in Controlling the Interactions of Classifiers.
When you specify multiple
classification variables, the crossings are always generated in a
specific way: by cycling though the last classifier, and then the
next-to-last, until all classifiers are exhausted. The following illustration
assumes that classifier A has distinct values a1 and a2, and that
classifier B has distinct values b1, b2, and b3:
layout datapanel classvars=(A B) / columns=3 rows=2 ;