Working with Graphs

About SAS ODS Statistical Graphs

SAS ODS Statistical Graphics, more commonly referred to as SAS ODS Graphics, is an extension of the SAS Output Delivery System (ODS). ODS manages all output that is created by procedures and enables you to display the output in a variety of forms, including HTML and PDF.
Many SAS analytical procedures use ODS Graphics functionality to produce graphs as automatically as these procedures produce tables. ODS Graphics uses the Graph Template Language (GTL) syntax, which provides the power and flexibility to create many complex graphs. The GTL is a comprehensive language for defining statistical graphics.
In SAS Web Editor, you can use the ODS Graphics Designer to define these statistical graphics without knowing the GTL. After a graph definition is created, you can use that graph definition to create an ODS statistical graph in SAS Web Editor.

SAS ODS Graphics Designer

What Is the SAS ODS Graphics Designer?

The SAS ODS Graphics Designer is an interactive graphical application that you can use to create and design custom graphs. The designer creates graphs that are based on the Graph Template Language (GTL), which is the same language that is used by SAS analytical procedures and SAS ODS Graphics procedures. The ODS Graphics Designer provides a graphical user interface, so that you can design graphs easily without knowing the details of templates and the GTL.
Using point-and-click interaction, you can create simple or complex graphical views of data for analysis. The ODS Graphics Designer enables you to design sophisticated graphs by using a wide array of plot types. You can design multi-cell graphs, classification panels, and scatter plot matrices. Your graphs can have titles, footnotes, legends, and other graphics elements. You can save the results as an image for inclusion in a report or as an ODS Graphics Designer file (SGD) that you can later edit.
For more information, see SAS ODS Graphics Designer: User's Guide.
Note: The SAS ODS Graphics Designer is available only in Windows environments. It is not available on the Mac or iPad.

How to Install the SAS ODS Graphics Designer

To install the SAS ODS Graphics Designer, click More application options and select Install ODS Graphics Designer.

Open the SAS ODS Graphics Designer

After the SAS ODS Graphics Designer is installed, you can open it by using a menu option in SAS Web Editor. To open SAS ODS Graphics Designer, click More application options and select ODS Graphics Designer.
SAS ODS Graphics Designer

SAS ODS Graphics Editor

What Is the SAS ODS Graphics Editor?

The ODS Graphics Editor enables you to edit the various elements in the output graph while keeping the underlying data unchanged. In addition, you can annotate a graph by inserting text, lines, arrows, images, and other items in a layer above the graph. You can save the results of your customization as an ODS Graphics Editor (SGE) file and make incremental changes to the file. You can also save the results as a Portable Network Graphics (PNG) image file for inclusion in other documents.
For more information about the SAS ODS Graphics Editor, see SAS ODS Graphics Editor: User's Guide.

How to Install the SAS ODS Graphics Editor

To install the SAS ODS Graphics Editor, click More application options and select Install ODS Graphics Editor.
When you install the SAS ODS Graphics Editor, SAS Web Editor automatically creates the ~/Projects/ODSEditorFiles directory.

How to Edit Your Graphics Output

  1. Include this statement in your SAS code so that you can edit your graphics output:
    ods listing sge=on gpath="{home}/Projects/ODSEditorFiles";
    When you run this program, the graphical output is saved as an SGE file in your ~/Projects/ODSEditorFiles directory.
  2. In the Folders section of the navigation pane, expand the ODSEditorFiles folder.
    Example of SGE and PNG Files in the ODSEditorFiles Folder
  3. Double-click the filename to open the graph in the SAS ODS Graphics Editor.
For example, here is the SGPanel1.sge file in the SAS ODS Graphics Editor.
Example of an SGE File in the SAS ODS Graphics Editor
Note: The default list of files in your ODSEditorFiles folder are created by the code snippets in the Task and Snippets section. For more information, see Understanding Code Snippets.