SAS Institute. The Power to Know

SAS/GRAPH(R) 9.2: Graph Template Language Reference

Previous | Next
LAYOUT DATALATTICE Statement

Required Argument(s)

One of the ROWVAR= or COLUMNVAR= arguments is required. Both may 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, a R x 1 grid is produced.
  • If only the COLUMNVAR variable is used, a 1 x C grid is produced.

Variable values are always retained in data order. Formats may be assigned to class variables to create classification levels (for example, an AGEGROUPFMT. format for numeric AGE).

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 on the BEGINGRAPH statement. To set a panel size for all templates in the current SAS session, use the HEIGHT= and WIDTH= options on the ODS GRAPHICS statement. Size settings on the ODS GRAPHICS statement override size settings on 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 may 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 accomodates a grid of about 24 cells (6 columns by 4 rows). If you know that the number of cells will be 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 a number of smaller grids are produced that cumulatively show all of the value crossings.

Previous | Next | Top of Page