What's New in SAS ODS Graphics Procedures 9.3

Overview

The SAS ODS Graphics: Procedures Guide contains new information explaining how styles are applied to graphs that are grouped and non-grouped.
The second edition added a new introductory section. The new introduction includes a detailed description of a typical program and an example of each supported plot type.
In addition, the procedures have the following changes and enhancements for SAS 9.3:
  • inclusion with Base SAS and name change
  • changes to the default ODS output
  • new plot statements are available for the SGPLOT and SGPANEL procedures.
  • new options and enhancements are available for the PROC SGPLOT, PROC SGPANEL, and PROC SGSCATTER statements.
  • new options and enhancements are available for the existing plot statements in the SGPLOT and SGPANEL procedures.
  • new options and enhancements are available for the axis statements in the SGPLOT and SGPANEL procedures.
  • new options and enhancements are available for the SGRENDER procedure.
  • enhancements are available for the SGDESIGN procedure.
  • a new attribute map feature provides a mechanism for controlling the visual attributes that are applied to specific group data values in your graphs.
  • a new annotation feature provides a mechanism for adding shapes, images, and annotations to graph output.

ODS Graphics Procedures Are Included with Base SAS

The ODS Graphics procedures, formerly called SAS/GRAPH Statistical Graphics procedures, are now available with Base SAS software. SAS/GRAPH software is not required in order to use the procedures.
Note: The ODS Graphics Designer, ODS Graphics Editor, and Graph Template Language have also moved to Base SAS.

Changes to the Default ODS Output

In Windows and UNIX operating environments, when the ODS Graphics procedures are executed in the SAS Windowing environment, the default behavior has changed as follows:
  • HTML is the default ODS destination. If you close this destination and do not open another destination, then no destinations are open.
  • HTMLBlue is the default style for the HTML destination. You can change this default style in the SAS Preferences.
  • Graphs are no longer saved in the SAS current directory by default. They are saved in the directory that corresponds to your SAS Work library. You can specify a different directory in the SAS Preferences.
These changes do not apply when the procedures are run in batch mode. In addition, the z/OS operating environment continues to use the ODS LISTING destination as the default destination.
To create LISTING output, do one of the following:
  • Specify LISTING in the Results tab in the SAS Preferences.
  • Add the ODS LISTING statement to your SAS program.

New Plot Statements for the SGPLOT and SGPANEL Procedures

BUBBLE Statement

A new BUBBLE statement creates a bubble plot in which two variables determine the location of the bubble centers and a third variable controls the size of the bubble.

HBARPARM and VBARPARM Statements

New HBARPARM and VBARPARM statements create a horizontal or vertical bar chart based on a pre-summarized response value for each unique value of the category variable. You can also assign variables to the upper and lower limits.

HIGHLOW Statement

A new HIGHLOW statement creates a display of floating vertical or horizontal lines or bars that represent high and low values. The statement also gives you the option to display open and close values as tick marks and to specify a variety of plot attributes.

LINEPARM Statement

A new LINEPARM statement creates a straight line specified by a point and a slope. You can generate a single line by specifying a constant for each required argument. You can generate multiple lines by specifying a numeric variable for any or all required arguments.

WATERFALL Statement (SGPLOT Only, Preproduction)

A new WATERFALL statement creates a waterfall chart computed from input data. In the chart, bars represent an initial value of Y and a series of intermediate values identified by X leading to a final value of Y.

Updates to the PROC SGPLOT, PROC SGPANEL, and PROC SGSCATTER Statements

All three procedure statements include the following new options:
  • The DATTRMAP= option specifies an SG attribute map data set.
  • The SGANNO= option specifies an SG annotation data set.
  • The PAD= option reserves space around the border of an annotated graph.
The UNIFORM= option in the SGPLOT procedure enables you to control axis scaling and legend marker attributes for the row and column axes independently.

Updates to Plot Statements in the SGPLOT and SGPANEL Procedures

General Updates

The following options and enhancements have been added to multiple plot statements:
  • The ATTRID= option specifies the value of the ID variable in an attribute map data set. (This option is also used with the SGSCATTER procedure.)
  • The CATEGORYORDER= option specifies the order in which the response values are arranged. This option affects bar charts, line plots, and dot plots.
  • The CLIATTRS= and CLMATTRS= options now enable you to specify line attributes and fill attributes for confidence limits.
  • The CURVELABELATTRS= and DATALABELATTRS= options specify options for setting text attributes for plot curves and labels.
  • The DISCRETEOFFSET= option specifies an amount to offset graph elements from the category midpoints or from the discrete axis tick marks. This option affects bar charts, box plots.
  • The following are new options for grouped data (using the GROUP= option):
    • The CLUSTERWIDTH= option specifies the cluster width as a ratio of the midpoint spacing when a group is in effect. This option affects any plot that can have a discrete axis.
    • The GROUPDISPLAY= option specifies how to display grouped graphics elements. This option affects any plot that can have a discrete axis. (The option is not available for the HBARPARM and VBARPARM statements.)
    • The GROUPORDER= option specifies the ordering of graph elements within a group. This option affects any plot that can have a discrete axis.

BAND Statement

The following options and enhancements are specific to the BAND statement:
  • The CURVELABELLOWER= and CURVELABELUPPER= options specify labels for the plot’s upper and lower limits.
  • The TYPE= option specifies whether the data points for the band boundaries are connected as a series plot or as a step plot.

HBAR and VBAR Statements

The following options and enhancements are specific to the HBAR and VBAR statements:
  • The DATALABEL= option now enables you to specify a variable that contains values for the data labels.
  • The DATASKIN= option specifies a special effect to be used on all filled bars.
  • Some SAS styles display fill patterns for grouped bars.
Note: These options are also available with the new HBARPARM and VBARPARM statements. The DATALABEL and DATASKIN options are available with the new WATERFALL statement.
The VBAR and VBARPARM statements in the SGPLOT procedure have a DATALABELPOS= option, which specifies the location of the data label.

HBOX and VBOX Statements

The following options and enhancements are specific to the HBOX and VBOX statements:
  • The CAPSHAPE= option specifies the shape of the whisker cap lines.
  • The CONNECT= option specifies that a connect line joins a statistic from box to box.
  • Boxes can be grouped. In addition to the GROUP= option, the GROUPDISPLAY= and GROUPORDER= options are available.
  • The NOTCHES option shows the notches.
  • The NOMEAN option hides the mean symbol.
  • The NOMEDIAN option hides the median line.
  • The NOOUTLIERS option hides the outliers.
  • You can specify appearance attributes for these elements:
    • connect lines
    • data labels
    • box fills and lines
    • mean markers, median lines, outlier markers, and whisker and cap lines

HISTOGRAM Statement

The HISTOGRAM statement provides greater control over bins with the following options:
  • BINSTART= specifies the X coordinate of the first bin.
  • BINWIDTH= specifies the bin width.
  • NBINS= specifies the number of bins.

INSET and KEYLEGEND Statements

The INSET and KEYLEGEND statements enable you to change text attributes with the following options:
  • The TITLEATTRS= and TEXTATTRS= options in the INSET statement. The INSET statement applies to the SGPLOT procedure only.
  • The TITLEATTRS= and VALUEATTRS= options in the KEYLEGEND statement

VLINE Statement

The VLINE statement in the SGPLOT procedure has a DATALABELPOS= option, which specifies the location of the data label.

Axis Updates for the SGPANEL and SGPLOT Procedures

Axis Updates for the SGPLOT Procedure

The XAXIS, X2AXIS, YAXIS, and Y2AXIS statements support several enhancements and new options:
  • New LABELATTRS and VALUEATTRS options specify textual attributes for axis labels and axis tick value labels, respectively.
  • A new REVERSE option specifies that the tick values are displayed in reverse (descending) order.
  • New THRESHOLDMAX and THRESHOLDMIN options specify a threshold for displaying one more tick mark at the high end and the low end of the axis, respectively.

Axis Updates for the SGPANEL Procedure

The COLAXIS and ROWAXIS statements support several enhancements and new options:
  • The same updates are supported as listed in “Axis Updates for the SGPLOT Procedure”.
  • The REFTICKS option enables you to specify whether labels and values are added to the tick marks. (This option adds tick marks to the side of the panel that is opposite from the specified axis.)

Updates to the SGRENDER Procedure

You can use the SGRENDER procedure to render a graph from a SAS ODS Graphics Editor (SGE) file.

Updates to the SGDESIGN Procedure

The SGDESIGN procedure is supported on z/OS systems. However, the following limitations apply:
  • The procedure does not render SGD files that were generated with the previous release of the ODS Graphics Designer. You must open the SGD file in the 9.3 version of the ODS Graphics Designer (on a Windows or UNIX system). Then save the file in the 9.3 format.
  • SGD files must be transferred to the HFS file system of UNIX System Services in order to be rendered.

New Attribute Mapping Feature

A new attribute map feature provides a mechanism for controlling the visual attributes that are applied to specific group data values in your graphs. This feature uses SG attribute map data sets to associate data values with visual attributes. The data set uses reserved variable names for the attribute map identifier, the group value, and the attributes.
You can use attribute maps in the SGPLOT, SGPANEL, and SGSCATTER procedures. The procedure statement references the name of the SG attribute map data set, and plot statements specify the group and the attribute map identifier.

New Annotation Feature

A new annotation feature provides a mechanism for adding shapes, images, and annotations to graph output. For example, you can add text labels, lines, circles, rectangles, polygons, and images. This feature uses SG attribute data sets, which contain the commands for creating the annotation elements. The data set uses reserved variable names for the draw function and the attributes that control how the function is performed.
You can use annotation in the SGPLOT, SGPANEL, and SGSCATTER procedures. The procedure statement references the name of the SG annotation data set.