Using PROC TIMEPLOT

The TIMEPLOT procedure in Base SAS plots time series data vertically on the page instead of horizontally across the page as the PLOT procedure does. PROC TIMEPLOT can also print the data values as well as plot them.

The following statements use the TIMEPLOT procedure to plot CPI in the USCPI data set. Only the last 14 observations are included in this example. The plot is shown in Figure 3.14.

title "Plot of USCPI Data";
proc timeplot data=uscpi;
   plot cpi;
   id date;
   where date >= '1jun90'd;
run;

Figure 3.14 Output Produced by PROC TIMEPLOT
Plot of USCPI Data

   date              US      min                                             max
               Consumer      129.9                                         136.2
            Price Index     *--------------------------------------------------*
JUN1990          129.90     |c                                                 |
JUL1990          130.40     |    c                                             |
AUG1990          131.60     |             c                                    |
SEP1990          132.70     |                      c                           |
OCT1990          133.50     |                             c                    |
NOV1990          133.80     |                               c                  |
DEC1990          133.80     |                               c                  |
JAN1991          134.60     |                                     c            |
FEB1991          134.80     |                                       c          |
MAR1991          135.00     |                                        c         |
APR1991          135.20     |                                          c       |
MAY1991          135.60     |                                             c    |
JUN1991          136.00     |                                                c |
JUL1991          136.20     |                                                 c|
                            *--------------------------------------------------*

The TIMEPLOT procedure has several interesting features not discussed here. See "The TIMEPLOT Procedure" in the Base SAS Procedures Guide for more information.