SAS Institute. The Power to Know

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

Previous | Next
LAYOUT DATAPANEL Statement

Required Argument

CLASSVARS=(class-var1 ... class-varN)
specifies a list of classification variables. By default, a data cell is created for each crossing of these variables in the input data, and the total number of grid cells created is the result of a cross-tabulation table of all the classification variables plus any empty cells needed to complete the last row/column of the grid. You can request that data cells be generated for all possible crossings, even when the class variables have no values at those crossings. For more information, see the SPARSE= option.

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 DATAPANEL 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