The
ODS Graphics procedures, sometimes called ODS Statistical Graphics
procedures, use ODS Graphics functionality to produce plots for exploratory
data analysis and for customized statistical displays. The procedures
provide a simple, high-level syntax that enables you to produce sophisticated
graphs by using a wide array of plot types and layouts. You can create
scatter plots, histograms, bar charts, box plots, classification panels,
scatter plot matrices, and many other types of statistical and business
graphs. Your graphs can have titles, footnotes, legends, and other
graphics elements.
The procedures support
statistical analysis and can create simple or complex graphical views
of your data. Though the procedures were initially designed to facilitate
the production of standard statistical graphs, they are also well
suited for the production of non-statistical or business graphs.
The ODS Graphics procedures
create graphs that are based on the Graph Template Language (GTL).
However, you do not need to know the details of templates and the
GTL in order to use the ODS Graphics procedures. With very little
coding effort, you can use the procedures to create the most commonly
used graphs that are supported by the GTL.
There are five ODS
Graphics procedures, each with a specific purpose:
creates single-cell
plots with a variety of plot and chart types and overlays.
creates classification
panels for one or more classification variables. Each graph cell in
the panel can contain either a simple plot or multiple, overlaid plots.
Note: The SGPLOT and SGPANEL procedures
largely support the same types of plots and charts. For this reason,
the two procedures have an almost identical syntax. The main distinction
between the two procedures is that the SGPANEL procedure produces
a matrix of graphs, one for each level of a classification variable.
creates scatter plots
and scatter plot matrices with optional fits and ellipses.
produces graphs from
graph templates that are written in the GTL. You can also render a
graph from a SAS ODS Graphics Editor (SGE) file.
creates graphical output
based on a graph file that has been created by using the ODS Graphics
Designer application.
An ODS destination must
be open to create output from these procedures. By default, the ODS
HTML destination is open. You can use the ODS destination options
and the ODS GRAPHICS statement options to control many aspects of
your graph output.
For more information,
see Managing Your Graphics with ODS.
The procedures have
two facilities that enable you to modify graph output:
-
The SG annotation feature enables
you to add shapes, images, and other annotations to graph output.
-
SG attribute maps enable you to
control the visual attributes that are applied to specific data values
in your graphs. For example, if you create a graph that plots items
sold in different countries, you can specify the display attributes
for the sales data of each country by name. Attribute maps enable
you to ensure that particular visual attributes are applied based
on the value of the data rather than the position of the data in the
data set.
The ODS Graphics procedures
enable you to create complex statistical graphics that use the principles
of effective graphics to accurately communicate the
results of your analysis to your consumers. The minimal coding required
enables you to focus on your statistical analysis instead of the visual
appearance of your graphs.