| LAYOUT LATTICE Statement |
The axis statements can be used to simplify and clarify the layout by displaying only the external axes in the resulting graph.
The following figure shows the default layout with internal axes displayed:

This next figure shows a simplified layout with only the external axes displayed:

Axis statements are only useful if the data ranges across the affected columns or rows are comperable and can be unified to a common scale. For example, external axes are not supported if an affected lattice cell contains a LAYOUT OVERLAYEQUATED statement.
To unify column data ranges, use the COLUMNDATARANGE= option. To unify row data ranges, use the ROWDATARANGE= option. If the axis ranges are not unified for the affected columns or rows, the axis statements in the layout are ignored.
External X axes (top and/or bottom) for columns are specified within a COLUMNAXES block, nesting one or more COLUMAXIS statements within the block. If a lattice cell contains a LAYOUT OVERLAY with the XAXISOPTS= option specified, the XAXISOPTS= option is ignored. In such cases, the desired axis features should be specified on the COLUMNAXIS statement. An X2AXISOPTS= option is also ignored if specified on the OVERLAY.
External Y axes (left and/or right) for rows are specified within a ROWAXES block, nesting one or more ROWAXIS statements within the block. If a lattice cell contains a LAYOUT OVERLAY with the YAXISOPTS= option specified, the YAXISOPTS= option is ignored. In such cases, the desired axis features should be specified on the ROWAXIS statement. A Y2AXISOPTS= option is also ignored if specified on the OVERLAY.
The axis statements have the following general syntax:
For the list of axis-options , see Chapter 43, "Axis Options for LAYOUT LATTICE."
The following example shows a LAYOUT LATTICE block that uses a ROWAXES block to set external axes and display gridlines for the row display.
begingraph;
layout lattice /
rowdatarange=union
columns=2;
/* axis definitions */
rowaxes;
rowaxis /griddisplay=on;
endrowaxes;
/* cell contents */
scatterplot x=x y=t;
scatterplot x=x y=y;
endlayout;
endgraph;
Here, the LAYOUT LATTICE statement specifies the ROWDATARANGE option to unify the data ranges across rows in the layout. Because LAYOUT LATTICE specifies COLUMNS=2 and there are two plot statements in the template, the resulting graph has two columns and only one row. Thus, only one ROWAXIS statement is needed in the ROWAXES block to specify axis attributes for that row of graphs.
Copyright © 2007 by SAS Institute Inc., Cary, NC, USA. All rights reserved.