Base SAS 9.1 Procedures Guide, Volumes 1, 2, 3 and 4

Requirements: At least one PLOT statement

Tip: Supports the Output Delivery System. See Output Delivery System on page 32 for details.

ODS Table Names: See: ODS Table Names on page 1312

Reminder: You can use the ATTRIB, FORMAT, LABEL, and WHERE statements. See Chapter 3, Statements with the Same Function in Multiple Procedures, on page 57 for details. You can also use any global statements. See Global Statements on page 18 for a list.

PROC TIMEPLOT < option(s) >;

To do this

Use this statement

Produce a separate plot for each BY group

BY

Group data according to the values of the class variables

CLASS

Print in the listing the values of the variables that you identify

ID

Specify the plots to produce

PLOT

PROC TIMEPLOT Statement

PROC TIMEPLOT < option(s) >;

Options

DATA= SAS-data-set

MAXDEC= number

SPLIT= split-character

UNIFORM

BY Statement

Produces a separate plot for each BY group.

Main discussion: BY on page 58

BY <DESCENDING> variable-1

Required Arguments

variable

Options

DESCENDING

NOTSORTED

CLASS Statement

Groups data according to the values of the class variables.

Tip: PROC TIMEPLOT uses the formatted values of the CLASS variables to form classes. Thus, if a format groups the values, then the procedure uses those groups.

Featured in: Example 5 on page 1322

CLASS variable(s) ;

Required Arguments

variable(s)

Using Multiple CLASS Statements

You can use any number of CLASS statements. If you use more than one CLASS statement, then PROC TIMEPLOT simply concatenates all variables from all of the CLASS statements. The following form of the CLASS statement includes three variables:

Using a Symbol Variable

Normally, you use the CLASS statement with a symbol variable (see the discussion of plot requests on page 1308). In this case, the listing of the plot variable contains a column for each value of the symbol variable, and each row of the plot contains a point for each value of the symbol variable. The plotting symbol is the first character of the formatted value of the symbol variable. If more than one observation within a class has the same value of a symbol variable, then PROC TIMEPLOT plots and prints only the first occurrence of that value and writes a warning message to the SAS log.

ID Statement

Prints in the listing the values of the variables that you identify.

Featured in: Example 1 on page 1313

ID variable(s) ;

Required Arguments

variable(s)

PLOT Statement

Specifies the plots to produce.

Tip: Each PLOT statement produces a separate plot.

PLOT plot-request(s) / option(s) ;

Table 50.1 on page 1307 summarizes the options that are available in the PLOT statement.

Table 50.1: Summary of Options for the PLOT Statement

To do this

Use this option

Customize the axis

 

Specify the range of values to plot on the horizontal axis, as well as the interval represented by each print position on the horizontal axis

AXIS=

 

Order the values on the horizontal axis with the largest value in the leftmost position

REVERSE

Control the appearance of the plot

 

Connect the leftmost plotting symbol to the rightmost plotting symbol with a line of hyphens (-)

HILOC

 

Connect the leftmost and rightmost symbols on each line of the plot with a line of hyphens (-) regardless of whether the symbols are reference symbols or plotting symbols

JOINREF

 

Suppress the name of the symbol variable in column headings when you use a CLASS statement

NOSYMNAME

 

Suppress the listing of the values of the variables that appear in the PLOT statement

NPP

 

Specify the number of print positions to use for the horizontal axis

POS=

Create and customize a reference line

 

Draw lines on the plot that are perpendicular to the specified values on the horizontal axis

REF=

 

Specify the character for drawing reference lines

REFCHAR=

Display multiple plots on the same set of axes

 

Plot all requests in one PLOT statement on one set of axes

OVERLAY

 

Specify the character to print if multiple plotting symbols coincide

OVPCHAR=

Required Arguments

plot-request(s)

Options

AXIS= axis-specification

HILOC

JOINREF

NOSYMNAME

NPP

OVERLAY

OVPCHAR= character

POS= print-positions-for-plot

REF= reference-value(s)

REFCHAR= character

REVERSE

Категории