Chapter Contents
Chapter Contents
Previous
Previous
Next
Next
The BOXPLOT Procedure

PLOT Statement

PLOT (analysis-variables)*group-variable <(block-variables ) > < =symbol-variable > < / options >;

You can specify multiple PLOT statements after the PROC BOXPLOT statement. The components of the PLOT statement are as follows.

analysis-variables
identify one or more variables to be analyzed. An analysis variable is required. If you specify more than one analysis variable, enclose the list in parentheses. For example, the following statements request distinct box plots for the variables weight, length, and width:

   proc boxplot data=summary;
      plot (weight length width)*day;
   run;


group-variable
specifies the variable that identifies groups in the data. The group variable is required. In the preceding PLOT statement, day is the group variable.

block-variables
specify optional variables that group the data into blocks of consecutive groups. These blocks are labeled in a legend, and each block variable provides one level of labels in the legend.

symbol-variable
specifies an optional variable whose levels (unique values) determine the symbol marker used to plot the means. Distinct symbol markers are displayed for points corresponding to the various levels of the symbol variable. You can specify the symbol markers with SYMBOLn statements (refer to SAS/GRAPH Software: Reference for complete details).

options
enhance the appearance of the box plot, request additional analyses, save results in data sets, and so on. Complete descriptions for each option follow.

Table 18.1 lists all options in the PLOT statement by function.

Table 18.1: PLOT Statement Options
Option Description
Options for Controlling Box Appearance
BOXCONNECTconnects group means in box-and-whisker plots
BOXCONNECT=connects group means, medians, maximum values, minimum values, or quartiles in box-and-whisker plots
BOXSTYLE=specifies style of box-and-whisker plots
BOXWIDTH=specifies width of box-and-whisker plots
BOXWIDTHSCALE=specifies that widths of box-and-whisker plots vary proportionately to group size
CBOXES=specifies color for outlines of box-and-whisker plots
CBOXFILL=specifies fill color for interior of box-and-whisker plots
IDCOLOR=specifies outlier symbol color in schematic box-and-whisker plots
IDCTEXT=specifies outlier label color in schematic box-and-whisker plots
IDFONT=specifies outlier label font in schematic box-and-whisker plots
IDHEIGHT=specifies outlier label height in schematic box-and-whisker plots
IDSYMBOL=specifies outlier symbol in schematic box-and-whisker plots
LBOXES=specifies line types for outlines of box-and-whisker plots
NOSERIFSeliminates serifs from the whiskers of box-and-whisker plots
NOTCHESspecifies that box-and-whisker plots are to be notched
PCTLDEF=specifies percentile definition used for box-and-whisker plots
Options for Plotting and Labeling Points
CCONNECT=specifies color for line segments that connect points on plot
SYMBOLLEGEND=specifies LEGEND statement for levels of the symbol variable
SYMBOLORDER=specifies order in which symbols are assigned for levels of the symbol variable
Reference Line Options
CHREF=specifies color for lines requested by HREF=option
CVREF=specifies color for lines requested by VREF= option
HREF=specifies position of reference lines perpendicular to horizontal axis on box plot
HREFLABELS=specifies labels for HREF=lines
HREFLABPOS=specifies position of HREFLABELS= labels
LHREF=specifies line type for lines
LVREF=specifies line type for VREF= lines
NOBYREFspecifies that reference line information in a data set is to be applied uniformly to plots created for all BY groups
VREF=specifies position of reference lines perpendicular to vertical axis on box plot
VREFLABELS=specifies labels for VREF= lines
VREFLABPOS=specifies position of VREFLABELS= labels
Block Variable Legend Options
BLOCKLABELPOS=specifies position of label for the block variable legend
BLOCKLABTYPE=specifies text size of the block variable legend
BLOCKPOS=specifies vertical position of the block variable legend
BLOCKREPrepeats identical consecutive labels in the block variable legend
CBLOCKLAB=specifies color for filling background in the block variable legend
CBLOCKVAR=specifies one or more variables whose values are colors for filling background of the block variable legend
Axis and Axis Label Options
CAXIS=specifies color for axis lines and tick marks
CFRAME=specifies fill colors for frame for plot area
CONTINUOUSproduces horizontal axis for continuous group variable values
CTEXT=specifies color for tick mark values and axis labels
HAXIS=specifies major tick mark values for horizontal axis
HEIGHT=specifies height of axis label and axis legend text
HMINOR=specifies number of minor tick marks between major tick marks on horizontal axis
HOFFSET=specifies length of offset at both ends of horizontal axis
NOHLABELsuppresses label for horizontal axis
NOTICKREPspecifies that only the first occurrence of repeated, adjacent group values is to be labeled on horizontal axis
NOVANGLErequests vertical axis labels that are strung out vertically
SKIPHLABELS=specifies thinning factor for tick mark labels on horizontal axis
TURNHLABELSrequests horizontal axis labels that are strung out vertically
VAXIS=specifies major tick mark values for vertical axis of box plot
VMINOR=specifies number of minor tick marks between major tick marks on vertical axis
VOFFSET=specifies length of offset at both ends of vertical axis
VZEROforces origin to be included in vertical axis
WAXIS=specifies width of axis lines
Input Data Set Options
MISSBREAKspecifies that missing values between identical character group values signify the start of a new group
Graphical Enhancement Options
ANNOTATE=specifies annotate data set that adds features to box plot
BWSLEGENDdisplays a legend identifying the function of group size specified with the BOXWIDTHSCALE= option
DESCRIPTION=specifies string that appears in the description field of the PROC GREPLAY master menu for box plot
FONT=specifies software font for labels and legends on plots
NAME=specifies name that appears in the name field of the PROC GREPLAY master menu for box plot
NLEGENDrequests a legend displaying group sample sizes
PAGENUM=specifies the form of the label used in pagination
PAGENUMPOS=specifies the position of the page number requested with the PAGENUM= option
Grid Options
ENDGRIDadds grid after last box-and-whisker plot
GRIDadds grid to box plot
LENDGRID=specifies line type for grid requested with the ENDGRID option
LGRID=specifies line type for grid requested with the GRID option
WGRID=specifies width of grid lines
Plot Layout Options
INTERVAL=specifies natural time interval between consecutive group positions when time, date, or datetime format is associated with a numeric group variable
MAXPANELS=specifies maximum number of pages or screens for plot
NOFRAMEsuppresses frame for plot area
NPANELPOS=specifies number of group positions per panel on each plot
REPEATrepeats last group position on panel as first group position of next panel
TOTPANELS=specifies number of pages or screens to be used to display plot


Following are explanations of the options that you can specify in the PLOT statement after a slash (/).

ANNOTATE=SAS-data-set
specifies an ANNOTATE= type data set, as described in SAS/GRAPH Software: Reference.

BLOCKLABELPOS=ABOVE | LEFT
specifies the position of a block variable label in the block legend. The keyword ABOVE places the label immediately above the legend, and LEFT places the label to the left of the legend. Use the keyword LEFT with labels that are short enough to fit in the margin of the plot; otherwise, they are truncated. The default keyword is ABOVE.

BLOCKLABTYPE=SCALED | TRUNCATED
BLOCKLABTYPE=height
specifies how lengthy block variable values are to be treated when there is insufficient space to display them in the block legend. If you specify the BLOCKLABTYPE=SCALED option, the values are uniformly reduced in height so that they fit. If you specify the BLOCKLABTYPE=TRUNCATED option, lengthy values are truncated on the right until they fit. You can also specify a text height in vertical percent screen units for the values. By default, lengthy values are not displayed. For more information, see the section "Displaying Blocks of Data".

BLOCKPOS=n
specifies the vertical position of the legend for the values of the block variables. Values of n and the corresponding positions are as follows. By default, BLOCKPOS=1.
n Legend Position
1top of plot, offset from axis frame
2top of plot, immediately above axis frame
3bottom of plot, immediately above horizontal axis
4bottom of plot, below horizontal axis label


BLOCKREP
specifies that block variable values for all groups are to be displayed. By default, only the first block variable value in any block is displayed, and repeated block variable values are not displayed.

BOXCONNECT
BOXCONNECT=MEAN | MEDIAN | MAX | MIN | Q1 | Q3
specifies that the points representing group means, medians, maximum values, minimum values, first quartiles, or third quartiles are to be connected with line segments. If the BOXCONNECT option is specified without a keyword identifying the points to be connected, group means are connected. By default, no points are connected.

BOXSTYLE=keyword
specifies the style of the box-and-whisker plots displayed. If you specify BOXSTYLE=SKELETAL, the whiskers are drawn from the edges of the box to the extreme values of the group. This plot is sometimes referred to as a skeletal box-and-whisker plot. By default, the whiskers are drawn with serifs: you can specify the NOSERIFS option to draw the whiskers without serifs.

In the following descriptions, the terms fence and far fence refer to the distance from the first and third quartiles (25th and 75th percentiles, respectively), expressed in terms of the interquartile range (IQR). For example, the lower fence is located at 1.5×IQR below the 25th percentile; the upper fence is located at 1.5×IQR above the 75th percentile. Similarly, the lower far fence is located at 3×IQR below the 25th percentile; the upper far fence is located at 3×IQR above the 75th percentile.

If you specify BOXSTYLE=SCHEMATIC, a whisker is drawn from the upper edge of the box to the largest value within the upper fence and from the lower edge of the box to the smallest value within the lower fence. Serifs are added to the whiskers by default. Observations outside the fences are identified with a special symbol; you can specify the shape and color for this symbol with the IDSYMBOL= and IDCOLOR= options. The default symbol is a square. This type of plot corresponds to the schematic box-and-whisker plot described in Chapter 2 of Tukey (1977). See Figure 18.4 and the discussion in the section "Styles of Box Plots" for more information.

If you specify BOXSTYLE=SCHEMATICID, a schematic box-and-whisker plot is displayed in which the value of the first variable listed in the ID statement is used to label the symbol marking each observation outside the upper and lower fences.

If you specify BOXSTYLE=SCHEMATICIDFAR, a schematic box-and-whisker plot is displayed in which the value of the first variable listed in the ID statement is used to label the symbol marking each observation outside the lower and upper far fences. Observations between the fences and the far fences are identified with a symbol but are not labeled with the ID variable.

Figure 18.2 illustrates the elements of a skeletal box-and-whisker plot.

boxsty1a.gif (2331 bytes)

Figure 18.2: Skeletal Box-and-Whisker Plot

The skeletal style of the box-and-whisker plot shown in Figure 18.2 is the default.

BOXWIDTH=value
specifies the width (in horizontal percent screen units) of the box-and-whisker plots.

BOXWIDTHSCALE=value
specifies that the box-and-whisker plot width is to vary proportionately to a particular function of the group size n. The function is determined by the value.

If you specify a positive value, the widths are proportional to nvalue. In particular, if you specify BOXWIDTHSCALE=1, the widths are proportional to the group size. If you specify BOXWIDTHSCALE=0.5, the widths are proportional to \sqrt{n}, as described by McGill, Tukey, and Larsen (1978). If you specify BOXWIDTHSCALE=0, the widths are proportional to log(n). See Example 18.4 for an illustration of the BOXWIDTHSCALE= option.

You can specify the BWSLEGEND option to display a legend identifying the function of n used to determine the box-and-whisker plot widths.

By default, the box widths are constant.

BWSLEGEND
displays a legend identifying the function of group size n specified with the BOXWIDTHSCALE= option. No legend is displayed if all group sizes are equal. The BWSLEGEND option is not applicable unless you also specify the BOXWIDTHSCALE= option.

CAXIS=color
CAXES=color
CA=color
specifies the color for the axes and tick marks. This option overrides any COLOR= specifications in an AXIS statement. The default value is the first color in the device color list.

CBLOCKLAB=color
specifies a fill color for the frame that encloses the block variable label in a block legend. By default, this area is not filled.

CBLOCKVAR=variable | (variable-list)
specifies variables whose values are colors for filling the background of the legend associated with block variables. Each CBLOCKVAR= variable must be a character variable of no more than eight characters in the input data set, and its values must be valid SAS/GRAPH color names (refer to SAS/GRAPH Software: Reference for complete details). A list of CBLOCKVAR= variables must be enclosed in parentheses.

The procedure matches the CBLOCKVAR= variables with block variables in the order specified. That is, each block legend is filled with the color value of the CBLOCKVAR= variable of the first observation in each block. In general, values of the ith CBLOCKVAR= variable are used to fill the block of the legend corresponding to the ith block variable.

By default, fill colors are not used for the block variable legend. The CBLOCKVAR= option is available only when block variables are used in the PLOT statement.

CBOXES=color
CBOXES=(variable)
specifies the colors for the outlines of the box-and-whisker plots created with the PLOT statement. You can use one of the following approaches: The default color is the second color in the device color list.

CBOXFILL=color
CBOXFILL=(variable)
specifies the interior fill colors for the box-and-whisker plots. You can use one of the following approaches:



By default, the interiors are not filled.

CCONNECT=color
specifies the color for the line segments connecting points on the plot. The default color is the color specified in the COLOR= option in the SYMBOL1 statement. This option is not applicable unless you also specify the BOXCONNECT option.

CFRAME=color
CFRAME=(color-list)
specifies the colors for filling the rectangle enclosed by the axes and the frame. By default, this area is not filled. The CFRAME= option cannot be used in conjunction with the NOFRAME option. You can specify a single color to fill the entire area.

CHREF=color
specifies the color for the lines requested by the option. The default value is the first color in the device color list.

CONTINUOUS
specifies that numeric group variable values are to be treated as continuous values. By default, the values of a numeric group variable are considered discrete values unless the HAXIS= option is specified. For more information, see the discussion in the section "Continuous Group Variables".

CTEXT=color
specifies the color for tick mark values and axis labels. The default color is the color specified in the CTEXT= option in the most recent GOPTIONS statement.

CVREF=color
specifies the color for the lines requested by the VREF= option. The default value is the first color in the device color list.

DESCRIPTION='string'
DES='string'
specifies a description of the box plot, not longer than 40 characters, that appears in the PROC GREPLAY master menu. The default string is the variable name.

ENDGRID
adds a grid to the rightmost portion of the plot, beginning with the first labeled major tick mark position that follows the box-and-whisker plot. You can use the HAXIS= option to force space to be added to the horizontal axis.

FONT=font
specifies a software font for labels and legends. You can also specify fonts for axis labels in an AXIS statement. The FONT= font takes precedence over the FTEXT= font specified in the GOPTIONS statement. Hardware characters are used by default. Refer to SAS/GRAPH Software: Reference for more information on the GOPTIONS statement.

GRID
adds a grid to the box plot. Grid lines are horizontal lines positioned at labeled major tick marks, and they cover the length and height of the plotting area.

HAXIS=values
HAXIS=AXISn
specifies tick mark values for the horizontal (group) axis. If the group variable is numeric, the values must be numeric and equally spaced. Optionally, you can specify an axis name defined in a previous AXIS statement. Refer to SAS/GRAPH Software: Reference for more information on the AXIS statement.

Specifying the HAXIS= option with a numeric group variable causes the group variable values to be treated as continuous values. For more information, see the description of the CONTINUOUS option and the discussion in the section "Continuous Group Variables". Numeric values can be given in an explicit or implicit list. If the group variable is character, values must be quoted strings of length 16 or less. If a date, time, or datetime format is associated with a numeric group variable, SAS datetime literals can be used. Examples of HAXIS= lists follow:



If the group variable is numeric, the HAXIS= list must span the group variable values, and if the group variable is character, the HAXIS= list must include all of the group variable values. You can add group positions to the box plot by specifying HAXIS= values that are not group variable values.

If you specify a large number of HAXIS= values, some of these may be thinned to avoid collisions between tick mark labels. To avoid thinning, use one of the following methods.



HEIGHT=value
specifies the height (in vertical screen percent units) of the text for axis labels and legends. This value takes precedence over the HTEXT= value specified in the GOPTIONS statement. This option is recommended for use with software fonts specified with the FONT= option or with the FTEXT= option in the GOPTIONS statement. Refer to SAS/GRAPH Software: Reference for complete information on the GOPTIONS statement.

HMINOR=n
HM=n
specifies the number of minor tick marks between each major tick mark on the horizontal axis. Minor tick marks are not labeled. The default is HMINOR=0.

HOFFSET=value
specifies the length (in percent screen units) of the offset at both ends of the horizontal axis. You can eliminate the offset by specifying HOFFSET=0.

HREF=values
HREF=SAS-data-set
draws reference lines perpendicular to the horizontal (group) axis on the box plot. You can use this option in the following ways:



Unless the CONTINUOUS or HAXIS= option is specified, numeric group variable values are treated as discrete values, and only HREF=values matching these discrete values are valid. Other values are ignored.

HREFLABELS='label1' ... 'labeln'
HREFLABEL='label1' ... 'labeln'
HREFLAB='label1' ... 'labeln'
specifies labels for the reference lines requested by the HREF=option. The number of labels must equal the number of lines. Enclose each label in quotes. Labels can be up to 16 characters.

HREFLABPOS=n
specifies the vertical position of the HREFLABEL= label, as described in the following table. By default, n=2.

HREFLABPOS= Label Position
1along top of plot area
2staggered from top to bottom of plot area
3along bottom of plot area
4staggered from bottom to top of plot area


IDCOLOR=color
specifies the color of the symbol marker used to identify outliers in schematic box-and-whisker plots (that is, when you also specify one of the following options: BOXSTYLE=SCHEMATIC, BOXSTYLE=SCHEMATICID, and BOXSTYLE=SCHEMATICIDFAR). The default color is the color specified with the CBOXES= option; otherwise, the second color in the device color list is used.

IDCTEXT=color
specifies the color for the text used to label outliers when you specify one of the keywords SCHEMATICID or SCHEMATICIDFAR with the BOXSTYLE= option. The default value is the color specified with the CTEXT= option.

IDFONT=font
specifies the font for the text used to label outliers when you specify one of the keywords SCHEMATICID or SCHEMATICIDFAR with the BOXSTYLE= option. The default font is SIMPLEX.

IDHEIGHT=value
specifies the height for the text used to label outliers when you specify one of the keywords SCHEMATICID or SCHEMATICIDFAR with the BOXSTYLE= option. The default value is the height specified with the HTEXT= option in the GOPTIONS statement. Refer to SAS/GRAPH Software: Reference for complete information on the GOPTIONS statement.

IDSYMBOL=symbol
specifies the symbol marker used to identify outliers in schematic box plots when you also specify one of the following options: BOXSTYLE=SCHEMATIC, BOXSTYLE=SCHEMATICID, and BOXSTYLE=SCHEMATICIDFAR. The default symbol is SQUARE.

INTERVAL=DAY | DTDAY | HOUR | MINUTE | MONTH | QTR | SECOND
specifies the natural time interval between consecutive group positions when a time, date, or datetime format is associated with a numeric group variable. By default, the INTERVAL= option uses the number of group positions per panel that you specify with the NPANELPOS= option. The default time interval keywords for various time formats are shown in the following table.

Format Default Keyword Format Default Keyword
DATEDAYMONYYMONTH
DATETIMEDTDAYTIMESECOND
DDMMYYDAYTODSECOND
HHMMHOURWEEKDATEDAY
HOURHOURWORDDATEDAY
MMDDYYDAYYYMMDDDAY
MMSSMINUTEYYQQTR


You can use the INTERVAL= option to modify the effect of the NPANELPOS= option, which specifies the number of group positions per panel (screen or page). The INTERVAL= option enables you to match the scale of the horizontal axis to the scale of the group variable without having to associate a different format with the group variable.

For example, suppose that your formatted group values span an overall time interval of 100 days and a DATETIME format is associated with the group variable. Since the default interval for the DATETIME format is DTDAY and since NPANELPOS=20 by default, the plot is displayed with two panels (screens or pages).

Now, suppose that your data span an overall time interval of 100 hours and a DATETIME format is associated with the group variable. The plot for these data is created in a single panel, but the data occupy only a small fraction of the plot since the scale of the data (hours) does not match that of the horizontal axis (days). If you specify INTERVAL=HOUR, the horizontal axis is scaled for 50 hours, matching the scale of the data, and the plot is displayed with two panels.

You should use the INTERVAL= option only in conjunction with the CONTINUOUS or HAXIS= option, which produces a horizontal axis of continuous group variable values. For more information, see the descriptions of the CONTINUOUS and HAXIS= options, and the discussion in the section "Continuous Group Variables".

LBOXES=linetype
LBOXES=(variable)
specifies the line types for the outlines of the box-and-whisker plots. You can use one of the following approaches:



The default value is 1, which produces solid lines. Refer to the description of the SYMBOL statement in SAS/GRAPH Software: Reference for more information on valid linetypes.

LENDGRID=n
specifies the line type for the grid requested with the ENDGRID option. The default value is n=1, which produces a solid line. If you use the LENDGRID= option, you do not need to specify the ENDGRID option. Refer to the description of the SYMBOL statement in SAS/GRAPH Software: Reference for more information on valid linetypes.

LGRID=n
specifies the line type for the grid requested with the GRID option. The default value is n=1, which produces a solid line. If you use the LGRID= option, you do not need to specify the GRID option. Refer to the description of the SYMBOL statement in SAS/GRAPH Software: Reference for more information on valid linetypes.

LHREF=linetype
LH=linetype
specifies the line type for reference lines requested with the HREF=option. The default value is 2, which produces a dashed line. Refer to the description of the SYMBOL statement in SAS/GRAPH Software: Reference for more information on valid linetypes.

LVREF=linetype
LV=linetype
specifies the line type for reference lines requested by the VREF= option. The default value is 2, which produces a dashed line. Refer to the description of the SYMBOL statement in SAS/GRAPH Software: Reference for more information on valid linetypes.

MAXPANELS=n
specifies the maximum number of pages or screens for a plot. By default, n=20.

MISSBREAK
determines how groups are formed when observations are read from a DATA= data set and a character group variable is provided. When you specify the MISSBREAK option, observations with missing values of the group variable are not processed. Furthermore, the next observation with a nonmissing value of the group variable is treated as the beginning observation of a new group even if this value is identical to the most recent nonmissing group value. In other words, by specifying the option MISSBREAK and by inserting an observation with a missing group variable value into a group of consecutive observations with the same group variable value, you can split the group into two distinct groups of observations.

By default (that is, when you omit the MISSBREAK option), observations with missing values of the group variable are not processed, and all remaining observations with the same consecutive value of the group variable are treated as a single group.

NAME='string'
specifies a name for the box plot, not more than 8 characters, that appears in the PROC GREPLAY master menu.

NLEGEND
requests a legend displaying group sample sizes. If the sample size is the same for each group, that number is displayed. Otherwise, the minimum and maximum group sample sizes are displayed.

NOBYREF
specifies that the reference line information in an HREF=or VREF= data set is to be applied uniformly to box plots created for all the BY groups in the input data set. If you specify the NOBYREF option, you do not need to provide BY variables in the reference line data set. By default, you must provide BY variables.

NOFRAME
suppresses the default frame drawn around the plot.

NOHLABEL
suppresses the label for the horizontal (group) axis. Use the NOHLABEL option when the meaning of the axis is evident from the tick mark labels, such as when a date format is associated with the group variable.

NOSERIFS
eliminates serifs from the whiskers of box-and-whisker plots.

NOTCHES
specifies that box-and-whisker plots are to be notched. The endpoints of the notches are located at the median plus and minus 1.58({\rm IQR}/\sqrt{n}), where IQR is the interquartile range and n is the group sample size. The medians (central lines) of two box-and-whisker plots are significantly different at approximately the 0.05 level if the corresponding notches do not overlap. Refer to McGill, Tukey, and Larsen (1978) for more information. Figure 18.3 illustrates the NOTCHES option. Notice the folding effect at the bottom, which happens when the endpoint of a notch is beyond its corresponding quartile. This situation typically occurs when the group sample size is small.

boxnot1a.gif (2000 bytes)

Figure 18.3: Box Plot: the NOTCHES Option

NOTICKREP
applies to character-valued group variables and specifies that only the first occurrence of repeated, adjacent group values is to be labeled on the horizontal axis.

NOVANGLE
requests vertical axis labels that are oriented vertically. By default, the labels are drawn at an angle of 90 degrees if a software font is used.

NPANELPOS=n
NPANEL=n
specifies the number of group positions per panel. A panel is defined as a screen or page. You typically specify the NPANELPOS= option to display more box-and-whisker plots on a panel than the default number, which is n=20.

You can specify a positive or negative number for n. The absolute value of n must be at least 5. If n is positive, the number of positions is adjusted so that it is approximately equal to n and so that all panels display approximately the same number of group positions. If n is negative, no balancing is done, and each panel (except possibly the last) displays approximately |n| positions. In this case, the approximation is due only to axis scaling.

You can use the INTERVAL= option to change the effect of the NPANELPOS= option when a date or time format is associated with the group variable. The INTERVAL= option enables you to match the scale of the horizontal axis to the scale of the group variable without having to associate a different format with the group variable.

PAGENUM='string'
specifies the form of the label used for pagination. The string must be no longer than 16 characters, and it must include one or two occurrences of the substitution character `#'. The first `#' is replaced with the page number, and the optional second `#' is replaced with the total number of pages.

The PAGENUM= option is useful when you are working with a large number of groups, resulting in multiple pages of output. For example, suppose that each of the following PLOT statements produces multiple pages:

   proc boxplot data=pistons;
      plot diameter*hour / pagenum='Page #';
      plot diameter*hour / pagenum='Page # of #';
      plot diameter*hour / pagenum='#/#';
   run;


The third page produced by the first statement would be labeled Page 3. The third page produced by the second statement would be labeled Page 3 of 5. The third page produced by the third statement would be labeled 3/5.

By default, no page number is displayed.

PAGENUMPOS=TL | TR | BL | BR | TL100 | TR100 | BL0 | BR0
specifies where to position the page number requested with the PAGENUM= option. The keywords TL, TR, BL, and BR correspond to the positions top left, top right, bottom left, and bottom right, respectively. You can use the TL100 and TR100 keywords to ensure that the page number appears at the very top of a page when a title is displayed. The BL0 and BR0 keywords ensure that the page number appears at the very bottom of a page when footnotes are displayed.

The default keyword is BR.

PCTLDEF=index
specifies one of five definitions used to calculate percentiles in the construction of box-and-whisker plots. The index can be 1, 2, 3, 4, or 5. The five corresponding percentile definitions are discussed in the section "Percentile Definitions". The default index is 5.

REPEAT
REP
specifies that the horizontal axis of a plot that spans multiple pages is to be arranged so that the last group position on a page is repeated as the first group position on the next page. The REPEAT option facilitates cutting and pasting panels together. When a SAS DATETIME format is associated with the group variable, the REPEAT option is the default.

SKIPHLABELS=n
SKIPHLABEL=n
specifies the number n of consecutive tick mark labels, beginning with the second tick mark label, that are thinned (not displayed) on the horizontal (group) axis. For example, specifying SKIPHLABEL=1 causes every other label to be skipped. Specifying SKIPHLABEL=2 causes the second and third labels to be skipped, the fifth and sixth labels to be skipped, and so forth.

The default value of the SKIPHLABELS= option is the smallest value n for which tick mark labels do not collide. A specified n will be overridden to avoid collision. To reduce thinning, you can use the TURNHLABELS option.

SYMBOLLEGEND=LEGENDn
SYMBOLLEGEND=NONE
controls the legend for the levels of a symbol variable (see Example 18.1). You can specify SYMBOLLEGEND=LEGENDn, where n is the number of a LEGEND statement defined previously. You can specify SYMBOLLEGEND=NONE to suppress the default legend. Refer to SAS/GRAPH Software: Reference for more information on the LEGEND statement.

SYMBOLORDER=DATA | INTERNAL | FORMATTED
SYMORD=DATA | INTERNAL | FORMATTED
specifies the order in which symbols are assigned for levels of the symbol variable. The DATA keyword assigns symbols to values in the order in which values appear in the input data. The INTERNAL keyword assigns symbols based on sorted order of internal values of the symbol variable, and the FORMATTED keyword assigns them based on sorted formatted values. The default value is FORMATTED.

TOTPANELS=n
specifies the total number of panels to be used to display the plot. This option overrides the NPANEL= option.

TURNHLABELS
TURNHLABEL
turns the major tick mark labels for the horizontal (group) axis so that they are arranged vertically. By default, labels are arranged horizontally. You should specify a software font (using the FONT= option) in conjunction with the TURNHLABELS option. Otherwise, the labels may be displayed with a mixture of hardware and software fonts.

Note that arranging the labels vertically may leave insufficient room on the screen or page for a plot.

VAXIS=value-list
VAXIS=AXISn
specifies major tick mark values for the vertical axis of a box plot. The values must be listed in increasing order, must be evenly spaced, and must span the range of values displayed on the plot. You can specify the values with an explicit list or with an implicit list, as shown in the following example:

   proc boxplot;
      plot width*hour / vaxis=0 2 4 6 8;
      plot width*hour / vaxis=0 to 8 by 2;
   run;


You can also specify a previously defined AXIS statement with the VAXIS= option.

VMINOR=n
VM=n
specifies the number of minor tick marks between each major tick mark on the vertical axis. Minor tick marks are not labeled. By default, VMINOR=0.

VOFFSET=value
specifies the length in percent screen units of the offset at the ends of the vertical axis.

VREF=value-list
VREF=SAS-data-set
draws reference lines perpendicular to the vertical axis on the box plot. You can use this option in the following ways:



VREFLABELS='label1' ... 'labeln'
specifies labels for the reference lines requested by the VREF= option. The number of labels must equal the number of lines. Enclose each label in quotes. Labels can be up to 16 characters.

VREFLABPOS=n
specifies the horizontal position of the VREFLABEL= label, as described in the following table. By default, n=1.

n Label Position
1left-justified in plot area
2right-justified in plot area
3left-justified in right margin


VZERO
forces the origin to be included in the vertical axis for a box plot.

WAXIS=n
specifies the width in pixels for the axis and frame lines. By default, n=1.

WGRID=n
specifies the width in pixels for grid lines requested with the ENDGRID and GRID options. By default, n=1.

Chapter Contents
Chapter Contents
Previous
Previous
Next
Next
Top
Top

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