Chapter Contents


Doing More with SAS/ASSIST Software

Doing More with Plots

You can use Plots on the Graphics menu to create simple X * Y plots, X * Y plots by category, or multiple plots on one set of axes. In the "Graphics" chapter of Getting Started with the SAS System Using SAS/ASSIST Software, you learned how to produce a simple line plot. This section describes some of the more advanced plotting options.

Creating a Scatter Plot with the Regression Line Superimposed

In this section you create a plot showing the relationship between the height and the age of students in the CLASS table, and you leave the points on the plot unconnected. Additionally, you plot the fitted regression line and upper and lower 95% confidence limits for an individual prediction.

Setting Up the Plot

  1. To display the Simple X * Y Plot window, follow this selection path starting from the WorkPlace menu:

    Simple X * Y plot

    Simple X * Y Plot Window


  2. Use the Table button to select the SASUSER.CLASS table.

  3. Use the Vertical axis button to select HEIGHT as the vertical axis column.

    The default label associated with the vertical axis column, Height in inches, is used as the vertical axis label.

  4. Use the Horizontal axis button to select AGE as the horizontal axis column.

    The default label associated with the horizontal axis column, Age in years, is used as the horizontal axis label.

Adding a Regression Line and a Title

  1. Follow this selection path to display the Regression Method window:

    Additional options
    Line and symbol options
    Interpolation method
    Use regression analysis to plot

    Regression Method Window


    The Additional options item displays different windows depending on the type of plot you select.

  2. Leave the Type of regression as Linear.

  3. Select Individual for the Confidence limits, and leave the Confidence level as 95.

  4. Select OK twice, and then Goback.

  5. Follow this selection path to display the Title 1 window:

    Title 1

  6. Type Height by Age as the title for the plot.

    Note:   Titles carry over from one report or graphic to another. If you do not type a title and a title was selected previously in the current SAS/ASSIST session, the previous title automatically appears on this graphic.  [cautionend]

  7. Select OK twice and then Goback to return to the Simple X * Y Plot window.

Running the Plot

  1. Follow this selection path:

    The plot of the regression line with the actual data points and the upper and lower 95% confidence limits for an individual prediction appears in the GRAPH window.

    X * Y Plot Output


  2. To return to the SAS/ASSIST software from the GRAPH window, follow this selection path:


Additional Plot Options

X * Y Plot by Category

By choosing X * Y Plot by Category instead of Simple X * Y Plot, you can add an extra dimension to your plot. For example, using the SASUSER.CLASS table, and plotting HEIGHT versus WEIGHT, you can choose AGE as a category column. Each point on the plot is a different color depending on the age of the child represented by the data point. You can choose different line and symbol options for each value of the category column.

Multiple Plots Per Axes

By choosing Multiple Plots Per Axes instead of Simple X * Y Plot, you can specify up to four columns for the vertical axis. For example, using the SASUSER.CLASS table, you can plot both HEIGHT and WEIGHT versus AGE. For each plot, you can specify different line and symbol options.

Other Plot Options

By selecting Additional Options, you can

Chapter Contents



Top of Page

Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.