| Overview |
The LATTICE layout is a multi-cell layout with special features for combining plot data ranges in columns or rows, aligning corresponding plot areas across cells when possible, and externalizing axis information so it is not repeated in each cell. This layout and the OVERLAY are the most important and frequently used layouts.
In the following example, the lattice has one column and two rows.
proc template;
define statgraph distribution;
begingraph;
entrytitle "Distribution of Scores";
layout lattice / columns=1 rows=2
rowweight=(.9 .1)
columndatarange=union
rowgutter=2px;
columnaxes;
columnaxis / label="Score" ;
endcolumnaxes;
layout overlay / yaxisopts=(offsetmin=.03);
histogram score / scale=percent;
densityplot score / normal( ) ;
fringeplot score;
endlayout;
boxplot y=score / orient=horizontal;
endlayout;
endgraph;
end;
run;
![]() |
The overlay is apportioned 90% of the available height and the boxplot 10%. The data ranges for the X axes of the two cells are merged, and an COLUMNAXIS statement externalizes a single X axis and sets its label.
Copyright © 2007 by SAS Institute Inc., Cary, NC, USA. All rights reserved.