STATGRAPH templates
are used to 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 scatter plot with an overlaid regression line and confidence
limits of the mean for the HEIGHT and WEIGHT variables of a data set.
Graph Created with a STATGRAPH Template