Previous Page | Next Page

The PLOT Procedure

Example 2: Controlling the Horizontal Axis and Adding a Reference Line


Procedure features:

PLOT statement options:

HAXIS=

VREF=

Data set: DJIA

This example specifies values for the horizontal axis and draws a reference line from the vertical axis.


Program

 Note about code
options nodate pageno=1 linesize=80 pagesize=35;
 Note about code
proc plot data=djia;
   plot high*year='*'
 Note about code
                      / haxis=1950 to 1995 by 5 vref=3000;
 Note about code
   title 'High Values of Dow Jones Industrial Average';
   title2 'from 1954 to 1994';
run;

Output

                  High Values of Dow Jones Industrial Average                  1
                               from 1954 to 1994

                    Plot of High*Year.  Symbol used is '*'.

High |
     |
4000 +                                                                      *
     |                                                                     *
     |
     |                                                                   *
     |                                                                  *
3000 +----------------------------------------------------------------*---------
     |                                                           *  *
     |
     |
     |                                                             *
2000 +                                                          *
     |
     |                                                        *
     |
     |                                                     **
1000 +                        * ** **   ** *    ** *  * **
     |                  ** **         *     * *     *
     |          ** ** *
     |      * *
     |
   0 +
     |
     -+-------+-------+-------+-------+-------+-------+-------+-------+-------+-
    1950    1955    1960    1965    1970    1975    1980    1985    1990    1995

                                         Year

Previous Page | Next Page | Top of Page