|SAS/GRAPH Software: Reference
The language elements used
include SAS/GRAPH procedures, SAS/GRAPH statements,
and Annotate data sets. In addition to SAS/GRAPH language
elements, your SAS/GRAPH program may
include Base SAS statements and procedures that you use to process your data
or control the destination or format of your program output.
create graphics output, process data for other SAS/GRAPH procedures
to use, or manage graphics output that has been stored in a catalog. A SAS/GRAPH procedure
step typically contains these statements:
- starts the procedure. Typically it identifies
input and output data sets, and assigns a destination for graphics output.
For information on data sets and data requirements, see SAS Data Sets. For information
on assigning graphics catalogs, see
Storing Graphics Output in SAS Catalogs.
perform the work of the procedure; subordinate statements
that generate graphs are called action statements. For example,
the HBAR statement in the GCHART procedure is an action statement.
- executes the statements in the procedure
step. Use the QUIT statement to end the procedure. See also
In addition, many
can use the following statements:
- causes the procedure to produce multiple
graphs, each corresponding to a BY variable value. Each graph that is produced
for a value of a BY variable is stored as a separate catalog entry in either
the default catalog, WORK.GSEG, or in the catalog you specify with a GOUT=
option in the PROC statement. See BY Statement
for a complete description.
- adds text to the graphics output. See TITLE, FOOTNOTE, and NOTE Statements for a
You can also use other SAS language statements with SAS/GRAPH procedures.
See Other SAS Language Statements.
|SAS/GRAPH Global Statements|
SAS/GRAPH has its own
set of statements that affect only graphics output that is generated by the SAS/GRAPH procedures
and the graphics facilities Annotate and DSGI.
statements define or modify the titles, footnotes, legends, axes, symbols,
and patterns that appear on your graphs, as well as controlling the appearance
of the graph, the graphics environment, the destination of the output, and
You can specify these statements anywhere in your program,
and they remain in effect until explicitly changed or canceled. These are
the SAS/GRAPH global statements:
- modifies the appearance, position, and range
of values of axes in charts and plots.
- specifies graphics options that control
the appearance of graphics elements by specifying characteristics such as
default colors, fill patterns, fonts, or text height. Graphics options can
also temporarily change device settings.
- modifies the appearance and position of
legends generated by procedures that produce charts, plots, and maps.
- controls the color and fill of patterns
that are assigned to areas in charts, maps, and plots.
- specifies the shape and color of plot symbols
as well the interpolation method for plot data. It also controls the appearance
of lines in contour plots.
TITLE and FOOTNOTE
- add titles and footnotes to graphics output.
for complete descriptions of these statements.
An Annotate DATA step generates a data set of graphics commands
that can be applied to SAS/GRAPH procedure
output. See The Annotate Data Set
for information on building and using Annotate data sets. See Annotate Dictionary for a complete description
of all Annotate functions and variables.
These SAS language statements can also be used within SAS/GRAPH
- identify external files or aggregate file
storage locations that you want to use for input or output. See FILENAME Statement for more
- assigns a format to a variable. SAS/GRAPH procedures
use formatted values to determine such aspects of the graph as midpoints,
axis labels, tick-mark values, and legend entries.
- assigns a descriptive text string to a variable.
Unless other text is specified in the SAS/GRAPH program,
the label appears in place of the variable name.
- identify SAS libraries that contain SAS
data sets or catalogs that you want to use with your SAS/GRAPH programs.
See LIBNAME Statement
for more information.
- direct the output from certain SAS/GRAPH procedures
to the Output Delivery System.
The ODS LISTING statement directs PROC GDEVICE output to the
SAS listing file.
The ODS HTML statement is used with the GIF driver to direct
graphics output to one or more GIF files and create a variety of HTML files
that can display the GIF files in a Web browser. See ODS HTML Statement for information on using
the ODS HTML statement with SAS/GRAPH procedures.
- changes the value of one or more SAS system
- executes any statements that have not executed
and ends the procedure.
- specifies observations from SAS data sets
that meet a particular condition. Using a WHERE statement provides an easy
way to graph a subset of your data.
For a complete description of these statements, see SAS Language Reference:
The FILENAME statement associates a SAS fileref with
text file or output device. With SAS/GRAPH software,
you can use a FILENAME statement to
- point to a text file that you want to use for
data input or output.
- assign the destination of a graphics stream file
(GSF). This destination can be either a single, specific file or an aggregate
file storage location, such as directory or PDS. See About Exporting SAS/GRAPH Output for information on creating
graphics stream files.
You can also use the FILENAME statement to route input
to and from other devices. For details, see the SAS documentation for your
A FILENAME statement that points to an external file
has this general form:
- is any SAS name.
- is the physical name of the external file
or aggregate file storage location you want to reference. For details on specifying
the physical names of external files, see the SAS documentation for your operating
For a complete description of the FILENAME statement,
see SAS Language Reference: Dictionary.
The LIBNAME statement associates a libref with a SAS
A SAS data library can be either temporary or permanent. Typically, SAS
data libraries used with SAS/GRAPH software
- SAS files for data input and output.
- SAS catalogs that contain maps, fonts, or device
- SAS catalogs that contain graphics output. These
catalogs are often stored in permanent libraries. See Storing Graphics Output in SAS Catalogs for information
on storing graphics output in a permanent catalog.
The LIBNAME statement has this general
- is any SAS name.
- is the physical name for the SAS data library
on your host system. For details on specifying SAS-data-library,
see the SAS documentation for your operating environment.
The libref WORK is reserved; it always points to an area where temporary data
sets and catalogs are kept. The contents of WORK are deleted when you exit
a SAS session.
For a complete description of the LIBNAME statement,
see SAS Language Reference: Dictionary.
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.