Statistical Graphics Using ODS

A Primer on ODS Statistical Graphics

You can enable ODS Graphics by specifying the following statement:

ods graphics on;

ODS Graphics remains enabled for all procedure steps until you disable it by submitting the following statement:

ods graphics off;

When ODS Graphics is enabled, creating graphical output with procedures is as simple as creating tabular output. For more information about enabling and disabling ODS Graphics, see the section Enabling and Disabling ODS Graphics. For more information about the most commonly used ODS GRAPHICS statement options, see the section Syntax.

You can control your output by using the following ODS components:

  • ODS destination statements (such as ODS HTML or ODS RTF), which specify where you want your graphs to be displayed. For an example of HTML output, see FigureĀ 21.23. For a list of the supported destinations, see the section ODS Destination Statements. For more information about the most commonly used ODS destination statement options, see the section Syntax .

  • ODS SELECT and ODS EXCLUDE statements, which select and exclude graphs from your output. See the section Selecting and Excluding Graphs for an example of how to select graphs.

  • ODS OUTPUT statements, which create SAS data sets from the data object that is used to make the plot. See the section Specifying an ODS Destination for Graphics for an example.

  • procedure options, which specify what graphs to create. For each procedure, these options are described in the "Syntax" section of the procedure chapter. Usually, you use the PLOTS= option to control all graphs. The available graphs are listed in the "ODS Graphics" section, which is found in the "Details" section of each procedure chapter. Many graphs are produced by default.

  • ODS style templates, which control the general appearance and consistency of all graphs and tables. You can modify the styles that SAS provides and override style information in several ways. For more information about styles, see the sections ODS Styles and ODS Styles.

  • ODS graph templates, which modify the layout and details of each graph. For more information about graph templates, see the section Graph Templates in ChapterĀ 22: ODS Graphics Template Modification.

    Note: SAS provides a default template for each graph, so you do not need to know anything about templates in order to create statistical graphics.

You can also access individual graphs, control the resolution and size of graphs, and modify your graphs (as explained in the sections beginning with Selecting and Viewing Graphs). Alternatively, you can use special statistical graphics procedures to create custom graphs directly (see the section Statistical Graphics Procedures).