SAS Institute. The Power to Know

SAS/GRAPH(R) 9.2 Reference

Previous Page | Next Page

Introduction to SAS/GRAPH Software

Conventions Used in This Document

This section explains the conventions this document uses for text, SAS language syntax, and file and library references. The document uses the following terms in discussing syntax:

keyword

is a literal that is a primary part of the SAS language. (A literal must be spelled exactly as shown, although it can be entered in uppercase or lowercase letters.) Keywords in this document are procedure names, statement names, macro names, routine names, and function names.

argument

is an element that follows a keyword. It is either literal, or it is user-supplied. It has a built-in value (for example, NODISPLAY), or it has a value assigned to it (for example, COLOR=text-color).

Arguments that you must use are required arguments. Other arguments are optional arguments, or simply options.

value

is an element that follows an equal sign. It assigns a value to an argument. It may be a literal, or it may be a user-supplied value.

parameter

is a value assigned to an argument that itself takes a value, for example, the COLOR= parameter of the LABEL= option in a LEGEND statement, as shown in the following statement:

legend label=(color=blue);

Syntax Conventions

Type styles have special meanings when used in the presentation of SAS/GRAPH syntax in this document. The following list explains the style conventions for the syntax sections:

UPPERCASE

identifies SAS keywords such as the names of statements and procedures (for example, PROC GCHART). Also identifies arguments and values that are literals, (for example, NOLEGEND and LABEL=NONE).

italic

identifies arguments or values that you supply. Items in italic can represent user-supplied values that are either

  • nonliteral values assigned to an argument (for example, axis-color in COLOR=axis-color)

  • nonliteral arguments (for example, VBAR chart-variable. . . ; ).

In addition, an item in italics can be the generic name for a list of arguments or parameters from which the user can choose (for example, appearance-options).

The following symbols are used to indicate other syntax conventions:

< > (angle brackets)

identify optional arguments. Any argument not enclosed in angle brackets is required.

| (vertical bar)

indicates that you can choose one value from a group. Values separated by bars are mutually exclusive.

. . . (ellipsis)

indicates that the argument following the ellipsis can be repeated any number of times (plot-request <. . . plot-request-n>, for example). If the ellipsis and the following argument are enclosed in angle brackets, they are optional. In SAS/GRAPH, an ellipsis also indicates a range from which a value is selected (LINE=1 . . . 46, for example).

The following examples illustrate the syntax conventions described in this section. These examples contain selected syntax elements, not complete syntax.

PROC GANNO ANNOTATE=Annotate-data-set
<DATASYS>;
  • PROC GANNO is in uppercase because it is a SAS keyword, the name of a statement. The remaining elements are arguments for the statement.

  • ANNOTATE= is not enclosed in angle brackets because it is a required argument. It is in uppercase to indicate that it is a literal and must be spelled as shown.

  • Annotate-data-set is in italic because it is a value that you must supply; in this case, the value must be a data set name.

  • DATASYS is enclosed in angle brackets because it is an optional argument. It is in uppercase to indicate that it is a literal and must be spelled as shown.

  • The ending semicolon (;) is required because it is outside the angle brackets for the option.

SYMBOL <1 . . . 99>
<COLOR=symbol-color>
<MODE=EXCLUDE|INCLUDE>
<appearance-options>;
  • SYMBOL is in uppercase because it is a SAS keyword, the name of a statement. The numbers 1 . . . 99 are in angle brackets because they are optional. The ellipsis indicates that you choose one from the range of numbers 1 through 99. The remaining elements are arguments for the statement.

  • COLOR= is enclosed in angle brackets because it is an optional argument.

  • Symbol-color is in italics because it represents a value that you specify.

  • MODE= is enclosed in angle brackets because it is an optional argument.

  • EXCLUDE and INCLUDE are in uppercase because they are literal values and must be spelled exactly as shown. They are separated by a vertical bar (an or bar) because you use one or the other but not both.

  • Appearance-options is in italics because it is a generic name for a list of options that can be used in the SYMBOL statement.

HBAR chart-variable< . . . chart-variable-n>
</ <PATTERNID=BY | GROUP | MIDPOINT | SUBGROUP>
<statistic-options>>;
  • Chart-variable is italic because it is an argument that you supply. It is required because it is not in angle brackets.

  • Chart-variable-n is enclosed in angle brackets because additional user-supplied arguments are optional. The ellipsis before the argument indicates that it can be repeated as many times as desired.

  • PATTERNID= is a literal option. The values BY, GROUP, MIDPOINT, and SUBGROUP are literal values that are mutually exclusive. You can use only one, and it must be spelled as shown.

  • Statistic-options is in italics because it is the generic name of a list of options that affect the chart statistics.

When you are using an option, a statement, or a procedure whose syntax shows arguments or values in italics, you must supply the argument or value. When the argument or value is a font, color, or variable name, SAS/GRAPH expects valid font names, color names, and variable names. Consider the following four syntax samples:

FONT=font

COLOR=color

COLOR=text-color

PIE chart-variable < . . . chart-variable-n>;

Conventions for Examples and Output

Most of the chapters in this document include examples that illustrate some of the features of a procedure or its statements. Each example contains

  • a description of the highlights of the example

  • the program statements that produce the output

  • the actual output from the example

  • an explanation of the features of the example.

The output that is shown for the examples was generated in a Windows operating environment. If you are using a different operating environment, you may need to make some minor adjustments to the example programs.

In most cases, the output was sent to the Listing destination and generated using the default style and device for that destination. Exceptions are noted in the text.

The dimensions of the graphics output area vary across devices and when using the GRAPH windows. The dimensions may affect aspects of the graphics output - for example, the appearance of axes or the position of graphics elements that use explicit coordinates in units other than percent. You may need to adjust the dimensions of your graphics output area or the size of graphics elements to correct any differences you see. Most of the images of output in this document were generated with a GOPTIONS statement that specified a size approximately equal 5.5 inches by 4.2 inches, although some images may be larger, if necessary, to accommodate the content of the graph.

goptions hsize=5.5inin vsize=4.2in;

These HSIZE= and VSIZE= settings are not shown in the example code and are not necessary for generating the output, but you may want to use similar settings if your output looks different from the output that is shown in the document.

Most examples specify these options:

RESET=GLOBAL

cancels all currently defined AXIS, LEGEND, FOOTNOTE, TITLE, PATTERN, and SYMBOL definitions.

BORDER

draws a border around the graphics output area.

Previous Page | Next Page | Top of Page