Explore the possibilities provided by ODS Statistical Graphics (also known as ODS Graphics) with this gallery of examples. The examples are organized into five sections:

- Automatically Generated ODS Statistical Graphs
- Using PLOT Options with ODS Statistical Graphs
- Data Exploration with the SG Procedures
- SAS/GRAPH
^{®}Statistical Graphics Procedures - Customized Analytical Graphs Using the Graph Template Language

When ODS Graphics is enabled, SAS/ETS^{®}, SAS/STAT^{®}, and SAS/QC^{®} procedures
that support ODS Graphics create appropriate graphs, either by default or when you specify procedure options for requesting
specific graphs. The first two sections provide examples of both cases.

The SAS/GRAPH^{®} SG procedures enable you to produce graphs for data exploration or for customized displays.
The third and fourth sections include examples that range from the most basic to advanced uses of the SG procedures.

ODS Graphics are based upon the Graph Template Language. The examples in the fifth section
illustrate how you can use the SAS^{®} analytic procedures, the SG procedures, and the GTL together to produce
highly customized graphs.

The following examples provide a sample of the graphs that are automatically produced after you have enabled ODS graphics.

- Diagnostic Plots for Simple Linear Regression with PROC REG
- Frequency Bar Charts with PROC FREQ
- Partial Least Squares Plots with PROC PLS
- Box-Cox Transformation Plot with PROC TRANSREG
- Box-and-Whiskers Plots with PROC BOXPLOT
- Risk Differences, Odds Ratios, and Relative Risks Plots with PROC FREQ
- Comparing Styles

- Diagnostic Plots with PROC AUTOREG
- Model Diagnostic Plots with PROC PANEL
- Fit Diagnostics with PROC MODEL

PLOT options enable you to control which graphs are produced. You can exclude graphs that are normally generated by default, or you can select specific graphs to display.

- DFBETAS and DFFITS Plots with PROC REG
- LS-Means Diffogram with PROC GLIMMIX
- Survival Estimate Plot with PROC LIFETEST
- Principal Component Analysis Plots with PROC PRINCOMP
- Contour Plots with PROC KRIGE2D
- Contour and Surface Plots with PROC KDE
- Residual Histograms with PROC CALIS
- Frequency Dot Plots with PROC FREQ
- ROC Curves with PROC LOGISTIC

- Residual and Forecast Plots with PROC ARIMA
- PLOT Options in the ESTIMATE, FORECAST, and SEASON Statements of PROC UCM
- Forecasts and Prediction Errors with PROC ESM
- Unpacking Diagnostics Panels with PROC VARMAX
- Residuals and Q-Q Plots Plots for Klein's Model I with PROC SYSLIN

The SAS/GRAPH Statistical Graphics (SG) procedures enable you to produce graphs for data exploration or for customized displays. These examples illustrate how to use the SG procedures.

- Scatter Plot with PROC SGPLOT
- Bar-Line Chart with PROC SGPLOT
- Plotting Three Series with PROC SGPLOT
- Scatter Plot Matrices with PROC SGSCATTER
- Multiple Independent Scatter Plots and Spline Curves with PROC SGSCATTER
- Simple Comparative Panel with PROC SGSCATTER
- Comparative Panel of Regression Fits and Confidence Ellipses with PROC SGSCATTER
- Panel of Graph Cells of Histograms and Density Plots with PROC SGPANEL
- Panel of Regression Curves with PROC SGPANEL
- Panel of Bar Charts with PROC SGPANEL
- Panel of Line Plots with PROC SGPANEL

The following examples provide more thorough illustrations of the capabilities of the SG procedures. These examples demonstrate a wide range of complexity, from the most rudimentary use to the advanced use of the procedures.

- PROC SGPANEL
- PROC SGPLOT
- PROC SGRENDER
- PROC SGRENDER with the Graph Template Language (GTL)
- PROC SGSCATTER

The graphs that are produced by analytical procedures are controlled by specially designed graph templates. These examples demonstrate how you can customize the graphs by modifying an existing template or by creating your own graph template.

Statistics and Operations Research Home Page | Resources for ODS Statistical Graphics