StatGraph templates
create output called ODS Graphics. For complete information, see the
SAS Graph Template Language: User's Guide.
The following code creates
the StatGraph template MyGraphs.Regplot, which creates the following
graph:
proc template;
define statgraph mygraphs.regplot;
begingraph;
entrytitle "Regression Plot";
layout overlay;
modelband "mean";
scatterplot x=height y=weight;
regressionplot x=height y=weight / clm="mean";
endlayout;
endgraph;
end;
run;
ods listing style=analysis;
ods graphics / reset imagename="reg" width=500px;
proc sgrender data=sashelp.class template=mygraphs.regplot;
run;
The following display
shows a scatterplot with an overlaid regression line and confidence
limits for the mean of the HEIGHT and WEIGHT variables of a data set.
Scatterplot Created with a StatGraph Template