Introduction to ODS Graphics for the Non-Statistician

Are you a History, English, or other humanities major who has stumbled into SAS® programming? Are you a business analyst or report analyst whose statistical knowledge ends with mean, median, percentiles, and standard deviation? Don't know a fitted loess curve from a survival estimate? Need to produce some series plots and bar charts and maybe the occasional box plot? Don't panic! This presentation is for you! This presentation illustrates how to use Base® SAS procedures and new statistical graphics (SG) procedures (in particular, SGPLOT and SGPANEL) in SAS/GRAPH to produce simple plots and bar charts. Once you know the basics of the SGPLOT statements to produce single graphs, learning SGPANEL to create paneled output will be a cinch. Through concrete examples, this paper will guide you through the basics of producing and customizing simple graphs using the new SG procedures. In addition, use of the ODS GRAPHICS statement for setting graph options is covered. (Note: The SGRENDER procedure falls outside the scope of this presentation.) INTRODUCTION Although ODS Graphics was initially designed to make the production of standard statistical graphics easier, its capabilities are also well suited for the production of non-statistical, or business graphics. This paper is an introduction to the general capabilities of ODS Graphics. It is not intended to provide complete syntax information, but rather to illustrate general approaches to creating commonly used business graphics. WHAT IS ODS GRAPHICS? Until Version 9 of SAS, all graphics in SAS were done with” classic" SAS/GRAPH® procedures such as PROC GCHART and PROC GPLOT. Below is an example of a chart and plot created by these procedures: Figure 1: PROC GCHART Output Figure 2: PROC GPLOT Output While “classic” SAS/GRAPH procedures were very flexible and could produce customized output, many users found them difficult to use because customization came at the cost of additional statements and graphic options. In addition, creating statistical graphs required running a statistical procedure to create an output data set and then using a SAS/GRAPH procedure to graph the output data. ODS Graphics was primarily designed to make it easier for statistical users to develop commonly used statistical graphics. ODS Graphics consists of the following features: 1. Graphics capabilities added to statistical procedures 2. Graphics capabilities added to some Base SAS procedures 3. New components added to SAS/GRAPH. These include: Reporting and Information Visualization SAS Global Forum 2011