| Overview |
The GRIDDED layout creates a single- or multi-cell graph. Its primary uses are to present multiple plots in a grid, or to create a small table of text and statistics (an inset ) that is embedded in a graph. The cells of a gridded layout are completely independent of one another. In the following example, two OVERLAY layouts are nested in a GRIDDED layout to create a graph with two cells placed in one column.
proc template;
define statgraph gridded;
begingraph;
layout gridded / columns=1;
layout overlay;
ellipse x=height y=weight / clip=false
alpha=.01 type=predicted display=(fill);
scatterplot x=height y=weight;
entry "CLIP=FALSE" / autoalign=auto;
endlayout;
layout overlay;
ellipse x=height y=weight / clip=true
alpha=.01 type=predicted display=(fill);
scatterplot x=height y=weight;
entry "CLIP=TRUE" / autoalign=auto;
endlayout;
endlayout;
endgraph;
end;
run;
proc sgrender data=sashelp.class
template=gridded;
run;
![]() |
In this example, an ENTRY statement overlays text in each plot. The AUTOALIGN=AUTO option enables the software to judge where to place the text to avoid collision with the data being plotted. The CLIP=TRUE option requests that the ellipse boundaries be ignored when scaling the axes.
Copyright © 2007 by SAS Institute Inc., Cary, NC, USA. All rights reserved.