Previous Page | Next Page

Statistical Graphics Using ODS

Introduction

Effective graphics are indispensable for modern statistical analysis. They reveal patterns, differences, and uncertainty that are not readily apparent in tabular output. Graphics provoke questions that stimulate deeper investigation, and they add visual clarity and rich content to reports and presentations.

In earlier SAS releases, creating graphs with statistical procedures typically required additional programming steps such as creating output data sets with the values to plot, modifying these data sets with a DATA step program, and using traditional SAS/GRAPH procedures to produce the plots.

SAS 9.2 eliminates the need for additional programming by providing new functionality, referred to as ODS Statistical Graphics (or ODS Graphics for short). ODS Graphics is an extension of ODS (the Output Delivery System). ODS manages procedure output and lets you display it in a variety of destinations, such as HTML and RTF. With ODS Graphics, statistical procedures now produce graphs as automatically as they produce tables, and graphs are now integrated with tables in the ODS output. ODS Graphics is available in procedures in SAS/STAT, Base SAS, SAS/ETS, SAS/QC, SAS/GRAPH, and other products (see the section Procedures That Support ODS Graphics). Note that SAS/GRAPH software is required for ODS Graphics functionality.

ODS Graphics is enabled when you specify the following statement:

   ods graphics on;

When ODS Graphics is enabled, procedures that support ODS Graphics create appropriate graphs, either by default or when you specify procedure options for requesting specific graphs. These options are documented in the "Syntax" section of each procedure chapter, and the "Details" section of each chapter provides an "ODS Graphics" subsection that lists the graphs that are available. Once ODS Graphics is enabled, it stays enabled for the duration of your SAS session. Alternatively, you can turn it off as follows:

   ods graphics off;

For example, you might consider disabling ODS Graphics if your goal is solely to produce computational results. Often though, you can specify ODS GRAPHICS ON and then leave it on. Throughout this chapter, ODS Graphics is enabled only once per section.


This chapter provides a basic introduction to ODS Graphics along with more detailed information. The following list provides a guide to reading this chapter:

  • If you want to see a few of the many graphs that are produced by statistical procedures by using ODS Graphics, see the section Getting Started with ODS Statistical Graphics.

  • If you are using ODS Graphics for the first time, read the section A Primer on ODS Statistical Graphics, which provides the minimum information that you need to get started.

  • If you need to create plots of raw data or your own customized plots of statistical results, see the section Statistical Graphics Procedures, which describes new SAS/GRAPH procedures that use ODS Graphics.

  • If you need information about specialized topics such as accessing your graphs, making changes to your graphs, and working with ODS styles, see the detailed discussions starting with the section Syntax and including the section Examples of ODS Statistical Graphics.

If you are unfamiliar with ODS, see Chapter 20, Using the Output Delivery System. For complete documentation about the Output Delivery System, see the SAS Output Delivery System: User's Guide. For complete documentation about ODS graph templates, see the SAS/GRAPH: Graph Template Language User's Guide and the SAS/GRAPH Template Language Reference. For complete documentation about the Graphics Editor, see the Getting Started with the SAS/GRAPH Statistical Graphics Editor. Also see the SAS/GRAPH: Statistical Graphics Procedures Guide for information about the statistical graphics procedures.


Previous Page | Next Page | Top of Page