Specifies the plots to
produce.
Tip: |
Each PLOT statement produces a separate plot.
|
PLOT
plot-request(s)/option(s);
|
The
following table summarizes the options that are available in the PLOT statement.
Summary of Options for the PLOT Statement
Task |
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=
|
- plot-request(s)
-
specifies the variable or variables to plot. (Optional)
Also specifies 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.
- (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.
- (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.
-
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.
-
For numeric values, axis-specification can be one of the following or a
combination
of both:
The values must be in either ascending or descending order. Use a negative
value for increment to specify descending order. The specified
values are spaced evenly along the horizontal axis even if the values are
not uniformly distributed. Numeric values can be specified in the following
ways:
Specification |
Comments |
axis=1 2 10
|
Values are 1, 2, and 10. |
axis=10 to 100 by 5
|
Values appear in increments of 5, starting at 10 and ending
at 100. |
axis=12 10 to 100 by 5
|
A combination of the two previous forms of
specification. |
-
For axis variables that contain datetime values,
axis-specification
is either an explicit list of values or a starting and an ending value with
an increment specified:
|
'date-time-value'i <. . .
'date-time-value'i>
| |
|
'date-time-value'i TO 'date-time-value'i
<BY
increment>
| |
- 'date-time-value'i
-
any SAS date, time, or datetime value described for the
SAS functions INTCK and INTNX. The suffix i is one of the following:
D |
date |
T |
time |
DT |
datetime |
- increment
-
one of the valid arguments for the INTCK or INTNX functions.
For dates, increment can be one of the following:
For datetimes,
increment can be one of the following:
DTDAY |
DTWEEK |
DTMONTH |
DTQTR |
DTYEAR |
For times,
increment can be one of the following:
For example,
axis='01JAN95'd to '01JAN96'd by month
axis='01JAN95'd to '01JAN96'd by qtr
For descriptions of individual intervals, see the chapter on dates,
times, and intervals in
SAS Language Reference: Concepts.
Note: You must use a FORMAT statement to print the tick-mark values
in an understandable form.
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, then PROC TIMEPLOT uses angle brackets (<
or >) on the left or right border of the plot to indicate
a value that is 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, then 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, then PROC TIMEPLOT does not connect the symbols.
-
NOSYMNAME
-
suppresses the name of the symbol variable in column headings
when you use a CLASS statement. If you use NOSYMNAME, then only the value
of the symbol variable appears in the column heading.
-
NPP
-
suppresses the listing of the values of the variables that
appear in the PLOT statement.
-
OVERLAY
-
plots all requests in one PLOT statement on one set of axes.
Otherwise, PROC TIMEPLOT produces a separate plot for each plot request.
-
OVPCHAR='character'
-
specifies the character to print if multiple plotting symbols
coincide. If a plotting symbol and a character in a reference line coincide,
then PROC TIMEPLOT prints the plotting symbol.
-
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=, then
PROC TIMEPLOT initially assumes that POS=20. However, if space permits, then
this value increases so that the plot fills the available space. |
Interaction: |
If you specify POS=0 and AXIS=,
then 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)
can be constants, or you can use the form
If you use this form of REF=, then 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, then the procedure calculates the mean values
for the variables over all observations for all BY groups. If you do not
use UNIFORM, then the procedure calculates the mean for each variable for
each BY group. |
Interaction: |
If a plotting symbol and a reference
character coincide, then PROC TIMEPLOT prints the plotting symbol. |
-
REFCHAR='character'
-
specifies the character for drawing reference lines.
Default: |
vertical bar (|) |
Interaction: |
If you are using the JOINREF or
HILOC option, then 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.
|
|
Copyright © 2010 by SAS Institute Inc., Cary, NC, USA. All rights reserved.