Previous Page | Next Page

Plotting the Relationship between Variables

Review of SAS Tools


PROC PLOT Statements

PROC PLOT <DATA=SAS-data-set> <options>;
LABEL variable='label';
PLOT request-list </option(s)>;
TITLE<n> <'title'>;
PROC PLOT <DATA=SAS-data-set> <option(s)> ;

starts the PLOT procedure. You can specify the following option(s) in the PROC PLOT statement:

DATA=SAS-data-set

names the SAS data set that PROC PLOT uses. If you omit DATA=, then PROC PLOT uses the most recently created data set.

HPERCENT=percent(s)

specifies one or more percentages of the available horizontal space to use for each plot. HPERCENT= enables you to put multiple plots on one page. PROC PLOT tries to fit as many plots as possible on a page. After using each of the percent(s), PROC PLOT cycles back to the beginning of the list. A zero in the list forces PROC PLOT to go to a new page even though it could fit the next plot on the same page.

NOLEGEND

suppresses the default legend. The legend lists the names of the variables being plotted and the plotting symbols that are used in the plot.

VPERCENT=percent(s)

specifies one or more percentages of the available vertical space to use for each plot. If you use a percentage greater than 100, then PROC PLOT prints sections of the plot on successive pages.

LABEL variable='label';

specifies to use labels for the axes. Variable names the variable to label and label specifies a string of up to 256 characters, which includes blanks. The label must be enclosed in single or double quotation marks.

PLOT request-list </option(s)>;

enables you to request individual plots in the request-list in the PLOT statement. Each element in the list has the following form:

vertical*horizontal<='symbol'>

where vertical and horizontal are the names of the variables that appear on the axes and symbol is the character to use for all points on the plot.

You can request any number of plot statements in one PROC PLOT step. A list of options pertains to a single plot statement.

BOX

draws a box around the entire plot, rather than only on the left side and bottom.

HAXIS=<tick-value-list>

specifies the tick mark values for the horizontal axis. The tick-value-list consists of a list of values to use for tick marks.

OVERLAY

superimposes all of the plots that are requested in the PLOT statement on one set of axes. The variable names, or variable labels if they exist, from the first plot are used to label the axes. Unless you use the HAXIS= or the VAXIS= option, PROC PLOT automatically scales the axes in the way that best fits all the variables.

VAXIS=<tick-value-list>

specifies tick mark values for the vertical axis. The tick-value-list consists of a list of values to use for tick marks.

TITLE<n> <'title'>;

specifies a title. The argument n is a number from 1 to 10 that immediately follows the word TITLE, with no intervening blank, and specifies the level of the TITLE. The text of each title must be enclosed in single or double quotation marks. The maximum title length that is allowed depends on your operating environment and the value of the LINESIZE= system option. Refer to the SAS documentation for your operating environment for more information.

Previous Page | Next Page | Top of Page