Statistical Graphics Using ODS


Effective graphics are indispensable in 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. Statistical graphs are produced by ODS Graphics, which is an extension of ODS (the Output Delivery System). ODS manages procedure output (including both tables and graphs) and lets you display it in a variety of destinations, such as HTML and RTF. With ODS Graphics, statistical procedures produce graphs as automatically as they produce tables, and graphs are integrated with tables in the ODS output. ODS Graphics is available in procedures in SAS/STAT, Base SAS, SAS/ETS, SAS/QC, and other SAS products (see the section Procedures That Support ODS Graphics). ODS Graphics is automatically provided with Base SAS software.

ODS Graphics might or might not be enabled by default, depending on your operating system, whether you are in the SAS windowing environment, your registry, your system options, and your configuration file settings. For more information about default settings and enabling and disabling ODS Graphics, see the section Enabling and Disabling ODS Graphics.

You can enable ODS Graphics by specifying the following statement:

ods graphics on;

When ODS Graphics is enabled, procedures that support ODS Graphics create the appropriate graphs, either by default or when you specify procedure options to request 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 available graphs. Once ODS Graphics is enabled, it stays enabled for the duration of your SAS session unless you disable it.

You can disable ODS Graphics by specifying the following statement:

ods graphics off;

You might consider disabling ODS Graphics if your goal is solely to produce computational results. Often, you can enable ODS Graphics and then leave it enabled. Throughout this chapter, ODS Graphics is enabled only once per section.