• Print  |
  • Feedback  |

TEMPLATE Procedure: ODS Graphics Overview (Experimental)

Overview: ODS Statistical Graphs

CAUTION:
Creating ODS statistical graphics is an experimental feature that is available in Version 9.1. Do not use this part of the TEMPLATE procedure in production jobs.

Getting Started

In SAS 9.1, a number of statistical procedures have been modified to use an experimental extension to the Output Delivery System (ODS) that enables the procedures to create statistical graphics as automatically as tables. This facility is referred to as ODS Statistical Graphics (or ODS Graphics for short), and it is invoked when you provide the experimental ODS GRAPHICS statement prior to your procedure statements. Any procedures that use ODS Graphics then create graphics, either by default or when you specify procedure options for requesting specific graphs.

With ODS Graphics, a SAS procedure creates the graphs that are most commonly needed for a particular analysis. In many cases, graphs are automatically enhanced with useful statistical information or metadata, such as sample sizes and p-values, which are displayed in an inset box. Using ODS Graphics eliminates the need to save numerical results in an output data set, manipulate them with a DATA step program, and display them with a graphics procedure.

If you are using ODS Graphics for the first time, begin by reading "Statistical Graphics Using ODS" in SAS/STAT User's Guide, which illustrates the use of ODS Graphics, and provides general information on managing your graphics. Additional examples are given in the sections for procedures that use ODS Graphics in SAS 9.1.


ODS Graphics Are Output Objects

In many ways, creating graphs with ODS is analogous to creating tables with ODS. You can use the following language elements:

Additionally, you can use the following ODS features: In SAS 9.1, the ODS destinations that support ODS Graphics include the following:

Customizing ODS Graphics- If You Must!

In common applications of procedures that use ODS Graphics, the default graphs should suffice. However, when modifications become necessary, you can customize a particular graph by changing its template definition. As with table definitions, you can access ODS statistical graph definitions and modify them with the TEMPLATE procedure. For more information, see the section about customizing ODS Graphics by using templates in the SAS/STAT User's Guide.

ODS statistical graph definitions are written in an experimental graph template language, which has been added to the TEMPLATE procedure in SAS 9.1. The language elements include statements for specifying plot types (such as scatter plots and histograms), plot layouts, and text (such as titles and insets). Also, support for built-in computations (such as histogram binning) and evaluation of computational expressions is provided. Options are available for specifying colors, marker symbols, and other aspects of plot features.


Role of ODS Statistical Graph Templates

Ordinarily, you should not need to modify ODS templates for graphs, just as you do not need to modify templates for tables.

The graph template language is primarily used by SAS developers to construct SAS-supplied templates for graphics created by statistical procedures. A secondary role of the graph template language is to enable you to modify the templates which SAS supplies.

Note:   The graph template language is not a stand-alone mechanism for creating highly customized graphics displays (such as the Annotate facility in SAS/GRAPH).

The purpose of this document is to provide syntax details about the graph template language of the TEMPLATE procedure.


Previous Page | Next Page | Top of Page