Previous Page | Next Page

The PLOT Procedure

Example 3: Overlaying Two Plots


Procedure features:

PLOT statement options

BOX

OVERLAY

Data set: DJIA

This example overlays two plots and puts a box around the plot.


Program

 Note about code
options nodate pageno=1 linesize=64 pagesize=30;
 Note about code
proc plot data=djia;
   plot high*year='*'
        low*year='o' / overlay box;
 Note about code
   title 'Plot of Highs and Lows';
   title2 'for the Dow Jones Industrial Average';
run;

Output

                     Plot of Highs and Lows                    1
              for the Dow Jones Industrial Average

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

      ---+---------+---------+---------+---------+---------+---
 4000 +                                              *        +
      |                                             *         |
      |                                            * o        |
      |                                           *oo         |
 High |                                          *            |
      |                                       * *             |
      |                                           o           |
      |                                        *oo            |
 2000 +                                      * o              +
      |                                       o               |
      |                                     *o                |
      |                                   **o                 |
      |                ****** ************oo                  |
      |           *****oooooo*o o oooooooo                    |
      |      *****oooo           o                            |
      |      o                                                |
    0 +                                                       +
      ---+---------+---------+---------+---------+---------+---
       1950      1960      1970      1980      1990      2000

                                Year

NOTE: 7 obs hidden.

Previous Page | Next Page | Top of Page