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.

SGSCATTER

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

SGPLOT

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

SGPANEL

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

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

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 because it uses the Graph Template Language. The syntax for the other SG procedures is much simpler than that of the GTL, and so these procedures are recommended for creating most plots commonly required in statistical work.