Statistical Graphics Using ODS

Statistical Graphics Procedures

Three Base SAS statistical graphics procedures use ODS Graphics and provide a convenient syntax for creating a variety of graphs from raw data or from procedure output:


creates single-cell and multicell scatter plots and scatter plot matrices along with optional fits and ellipses.


creates single-cell plots along with a variety of plot and chart types.


creates single-page or multipage panels of plots and charts conditional on classification variables.

You do not need to enable ODS Graphics in order to use these SG (statistical graphics) procedures. In addition, the Base SAS SGRENDER procedure provides a way to create plots from graph templates that you modify or write yourself. For more information about the SG procedures and PROC SGRENDER, see the SAS ODS Graphics: Procedures Guide and Kuhfeld (2010).

These procedures do much more than make scatter plots. They can produce density plots, dot plots, needle plots, series plots, horizontal and vertical bar charts, histograms, and box plots. They can also compute and display loess fits, polynomial fits, penalized B-spline fits, reference lines, bands, and ellipses. PROC SGRENDER is the most flexible SG procedure because it uses the Graph Template Language (GTL). The syntax for the other SG procedures is much simpler than that of the GTL, so these procedures are recommended for creating most plots that are commonly required in statistical work.