Chapter Contents

Previous

Next
The TIMEPLOT Procedure

PLOT Statement


Specifies the plots to produce.

Tip: Each PLOT statement produces a separate plot.


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

Summary of Options for the PLOT Statement summarizes the options available in the PLOT statement.

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)
specifies the variable or variables to plot and, optionally, the plotting symbol to use. By default, each plot request produces a separate plot.

A plot request can have the following forms. You can mix different forms of requests in one PLOT statement (see Superimposing Two Plots ).

variable(s)
identifies one or more numeric variables to plot. PROC TIMEPLOT uses the first character of the variable name as the plotting symbol.
Featured in: Plotting a Single Variable

(variable(s))='plotting-symbol'
identifies one or more numeric variables to plot and specifies the plotting symbol to use for all variables in the list. You can omit the parentheses if you use only one variable.
Featured in: Customizing an Axis and a Plotting Symbol

(variable(s))=symbol-variable
identifies one or more numeric variables to plot and specifies a symbol variable. PROC TIMEPLOT uses the first nonblank character of the formatted value of the symbol variable as the plotting symbol for all variables in the list. The plotting symbol changes from one observation to the next if the value of the symbol variable changes. You can omit the parentheses if you use only one variable.
Featured in: Using a Variable for a Plotting Symbol


Options

AXIS=axis-specification
specifies the range of values to plot on the horizontal axis, as well as the interval represented by each print position on the axis. PROC TIMEPLOT labels the first and last ends of the axis, if space permits.

Interaction: The value of POS= (see POS= ) overrides an interval set with AXIS=.
Tip: If the range that you specify does not include all your data, PROC TIMEPLOT uses angle brackets (< or >) on the left or right border of the plot to indicate a value outside the range.
Featured in: Customizing an Axis and a Plotting Symbol

HILOC
connects the leftmost plotting symbol to the rightmost plotting symbol with a line of hyphens (-).
Interactions: If you specify JOINREF, PROC TIMEPLOT ignores HILOC.

JOINREF
connects 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. However, if a line contains only reference symbols, PROC TIMEPLOT does not connect the symbols.
Featured in: Using a Variable for a Plotting Symbol

NOSYMNAME
suppresses the name of the symbol variable in column headings when you use a CLASS statement. If you use NOSYMNAME, only the value of the symbol variable appears in the column heading.
Featured in: Showing Multiple Observations on One Line of a Plot

NPP
suppresses the listing of the values of the variables that appear in the PLOT statement.
Featured in: Using a Variable for a Plotting Symbol

OVERLAY
plots all requests in one PLOT statement on one set of axes. Otherwise, PROC TIMEPLOT produces a separate plot for each plot request.
Featured in: Superimposing Two Plots

OVPCHAR='character'
specifies the character to print if multiple plotting symbols coincide. If a plotting symbol and a character in a reference line coincide, PROC TIMEPLOT prints the plotting symbol.
Default: at sign (@)
Featured in: Showing Multiple Observations on One Line of a Plot

POS=print-positions-for-plot
specifies the number of print positions to use for the horizontal axis.
Default: If you omit both POS= and AXIS=, PROC TIMEPLOT initially assumes that POS=20. However, if space permits, this value increases so that the plot fills the available space.
Interaction: If you specify POS=0 and AXIS=, the plot fills the available space. POS= overrides an interval set with AXIS= (see the discussion of AXIS= ).
See also: Page Layout
Featured in: Plotting a Single Variable

REF=reference-value(s)
draws lines on the plot that are perpendicular to the specified values on the horizontal axis. The values for reference-value(s) may be constants, or you may use the form
MEAN(variable(s))

If you use this form of REF=, PROC TIMEPLOT evaluates the mean for each variable that you list and draws a reference line for each mean.
Interaction: If you use the UNIFORM option in the PROC TIMEPLOT statement, the procedure calculates the mean values for the variables over all observations for all BY groups. If you do not use UNIFORM, the procedure calculates the mean for each variable for each BY group.
Interaction: If a plotting symbol and a reference character coincide, PROC TIMEPLOT prints the plotting symbol.
Featured in: Using a Variable for a Plotting Symbol and Superimposing Two Plots

REFCHAR='character'
specifies the character for drawing reference lines.
Default: vertical bar (|)
Interaction: If you are using the JOINREF or HILOC option, do not specify a value for REFCHAR= that is the same as a plotting symbol because PROC TIMEPLOT will interpret the plotting symbols as reference characters and will not connect the symbols as you expect.
Featured in: Using a Variable for a Plotting Symbol

REVERSE
orders the values on the horizontal axis with the largest value in the leftmost position.
Featured in: Superimposing Two Plots


Chapter Contents

Previous

Next

Top of Page

Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.