Executing the Template to Produce the Graph

To produce a graph, use the SGRENDER procedure:
proc sgrender data=sashelp.class template=modelfit; run;
The SGRENDER procedure takes two required arguments: DATA= for the input data set and TEMPLATE= for the STATGRAPH template to be used.
Running the SGRENDER Procedure
SGRENDER produces the graph by
  • building a data object for the template. This data object contains only the requested variables (HEIGHT and WEIGHT) for the scatter points along with any other internally computed values, such as the points on the regression line.
  • obtaining default color, line, marker, and font properties from the currently active style.
This information, along with the GTL definition of the graph, is then passed to a rendering module that assembles everything and produces an image, which is integrated into the active ODS destination(s).
Minimally, one ODS destination must be open. By default, that destination is HTML. For this destination, the default is to create a file that contains a PNG image and an HTML file that displays the image in a browser window.
Graph output to the HTML destination is displayed automatically when you execute the template.. To view the output at any time afterwards, you can open the Results window (choose Viewthen selectResults from the menu) and select it.
Results Window
Graph that Has Been Opened from the Results Window in MS Windows
Graph that Has Been Opened from the Results Window in MS Windows
For more information about other features of SGRENDER, see Executing Graph Templates.