Chapter Contents |
Previous |
Next |
The TIMEPLOT Procedure |
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.
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 |
A plot request can have the following forms. You can mix different forms of requests in one PLOT statement (see Superimposing Two Plots ).
Featured in: | Plotting a Single Variable |
Featured in: | Customizing an Axis and a Plotting Symbol |
Featured in: | Using a Variable for a Plotting Symbol |
Options |
| ||
|
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. |
| ||
|
D | date | |
T | time | |
DT | datetime |
DAY | WEEK | MONTH | QTR | YEAR |
For datetimes, increment can be one of the following:
DTDAY | DTWEEK | DTMONTH | DTQTR | DTYEAR |
For times, increment can be one of the following:
HOUR | MINUTE | SECOND |
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, 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 |
Interactions: | If you specify JOINREF, PROC TIMEPLOT ignores HILOC. |
Featured in: | Using a Variable for a Plotting Symbol |
Featured in: | Showing Multiple Observations on One Line of a Plot |
Featured in: | Using a Variable for a Plotting Symbol |
Featured in: | Superimposing Two Plots |
Default: | at sign (@) |
Featured in: | Showing Multiple Observations on One Line of a Plot |
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 |
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 |
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 |
Featured in: | Superimposing Two Plots |
Chapter Contents |
Previous |
Next |
Top of Page |
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.