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:
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;
specifies the variable that identifies groups in the data. The group variable is required. In the preceding PLOT statement,
Day
is the group variable.
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.
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 (see SAS/GRAPH: Reference for complete details).
enhance the appearance of the box plot, request additional analyses, save results in data sets, and so on. Complete descriptions of each option follow.
Many PLOT statement options apply only to traditional graphics and are ignored when ODS Graphics is enabled. Table 28.6 summarizes the options available in the PLOT statement. It also lists options by function and indicates which are applicable with ODS Graphics.
Table 28.6: PLOT Statement Options
Option |
Description |
ODS Graphics |
---|---|---|
Options for Controlling Box Appearance |
||
Connects features of adjacent box-and-whiskers plots with line segments |
✓ |
|
Specifies style of box-and-whiskers plots |
✓ |
|
Specifies width of box-and-whiskers plots |
||
Specifies that widths of box-and-whiskers plots vary proportionately to group size |
✓ |
|
Specifies color for outlines of box-and-whiskers plots |
||
Specifies fill color for interior of box-and-whiskers plots |
||
Specifies outlier symbol color in schematic box-and-whiskers plots |
||
Specifies outlier label color in schematic box-and-whiskers plots |
||
Specifies outlier label font in schematic box-and-whiskers plots |
||
Specifies outlier label height in schematic box-and-whiskers plots |
||
Specifies outlier symbol in schematic box-and-whiskers plots |
||
Specifies outlier symbol height in schematic box-and-whiskers plots |
||
Specifies line types for outlines of box-and-whiskers plots |
||
Eliminates serifs from whiskers of box-and-whiskers plots |
✓ |
|
Specifies that box-and-whiskers plots be notched |
✓ |
|
Specifies percentile definition used for box-and-whiskers plots |
✓ |
|
Specifies that box whiskers be drawn to percentile values |
✓ |
|
Options for Plotting and Labeling Points |
||
Labels means of box-and-whiskers plots |
||
Specifies color for labels requested with ALLLABEL= option |
||
Specifies color for line segments requested with BOXCONNECT= option |
||
Specifies angle for labels requested with ALLLABEL= option |
||
Specifies LEGEND statement for levels of symbol variable |
||
Specifies order in which symbols are assigned for levels of symbol variable |
||
Reference Line Options |
||
Specifies color for lines requested by HREF= option |
||
Specifies color for lines requested by VREF= option |
||
Draws reference lines in front of boxes |
||
Requests reference lines perpendicular to horizontal axis |
✓ |
|
Specifies labels for HREF= lines |
✓ |
|
Specifies position of HREFLABELS= labels |
||
Specifies line type for HREF= lines |
||
Specifies line type for VREF= lines |
||
Specifies that reference line information in a data set be applied uniformly to plots created for all BY groups |
✓ |
|
Requests reference lines perpendicular to vertical axis |
✓ |
|
Specifies labels for VREF= lines |
✓ |
|
Specifies position of VREFLABELS= labels |
||
Block Variable Legend Options |
||
Specifies position of label for block variable legend |
||
Specifies text size of block variable legend |
||
Specifies vertical position of block variable legend |
✓ |
|
Repeats identical consecutive labels in block variable legend |
✓ |
|
Specifies colors for filling frames enclosing block variable labels |
||
Specifies colors for filling background of block variable legend |
||
Axis and Axis Label Options |
||
Specifies color for axis lines and tick marks |
||
Specifies fill color for frame for plot area |
||
Produces horizontal axis for continuous group variable values (traditional graphics only) |
||
Specifies color for tick mark values and axis labels |
||
Specifies major tick mark values for horizontal axis |
||
Specifies height of axis label and axis legend text |
||
Specifies number of minor tick marks between major tick marks on horizontal axis |
||
Specifies length of offset at both ends of horizontal axis |
||
Suppresses horizontal axis label |
✓ |
|
Specifies that only first occurrence of repeated, adjacent character group values be labeled on horizontal axis |
||
Requests vertical axis labels that are strung out vertically |
||
Specifies thinning factor for tick mark labels on horizontal axis |
||
Requests horizontal tick labels that are strung out vertically |
||
Specifies major tick mark values for vertical axis |
✓ |
|
Specifies format for vertical axis tick marks |
✓ |
|
Specifies number of minor tick marks between major tick marks on vertical axis |
||
Specifies length of offset at both ends of vertical axis |
||
Forces origin to be included in vertical axis |
||
Specifies width of axis lines |
||
Input Data Set Options |
||
Specifies that a missing value between identical character group values signify the start of a new group |
✓ |
|
Output Data Set Options |
||
Produces an output data set containing group summary statistics and outlier values |
✓ |
|
Produces an output data set containing group summary statistics |
✓ |
|
Graphical Enhancement Options |
||
Specifies annotate data set that adds features to box plot |
||
Displays a legend identifying the function of group size specified with BOXWIDTHSCALE= option |
||
Specifies string that appears in description field of PROC GREPLAY master menu for traditional graphics box plot |
||
Specifies font for labels and legends on plots |
||
Requests a horizontal box plot with ODS Graphics |
✓ |
|
Specifies URLs to be associated with box-and-whiskers plots |
||
Specifies name that appears in name field of PROC GREPLAY master menu for traditional graphics box plot |
||
Requests legend displaying group sizes |
||
Specifies URLs to be associated with high outliers on box-and-whiskers plots |
||
Specifies URLs to be associated with low outliers on box-and-whiskers plots |
||
Specifies form of label used in pagination |
||
Specifies position of page number requested with PAGENUM= option |
||
Grid Options |
||
Specifies color for grid requested with ENDGRID or GRID option |
||
Adds grid after last box-and-whiskers plot |
||
Adds grid to box plot |
✓ |
|
Specifies line type for grid requested with ENDGRID option |
||
Specifies line type for grid requested with GRID option |
||
Specifies width of grid lines |
||
Plot Layout Options |
||
Specifies natural time interval between consecutive group positions when time, date, or datetime format is associated with numeric group variable |
||
Specifies first major tick mark value on horizontal axis when date, time, or datetime format is associated with numeric group variable |
||
Specifies maximum number of panels used for box plot |
✓ |
|
Suppresses creation of box plot |
✓ |
|
Suppresses frame for plot area |
||
Specifies number of group positions per panel |
✓ |
|
Repeats last group position on panel as first group position of next panel |
✓ |
|
Specifies number of panels to be used to display box plot |
✓ |
|
Overlay Options |
||
Specifies colors for line segments connecting points on overlays |
||
Specifies colors for points on overlays |
||
Specifies line types for line segments connecting points on overlays |
||
Suppresses overlay legend |
✓ |
|
Specifies variables to be plotted on overlays |
✓ |
|
Specifies URLs to be associated with overlay plot points |
||
Specifies labels for overlay plot points |
||
Specifies label for overlay legend |
✓ |
|
Specifies symbols used for overlays |
||
Specifies heights for overlay symbols |
||
Specifies widths for line segments connecting points on overlays |
||
Clipping Options |
||
Specifies color for plot symbol for clipped points |
||
Determines extent to which extreme values are clipped |
✓ |
|
Specifies text for clipping legend |
✓ |
|
Specifies position of clipping legend |
||
Specifies substitution character for CLIPLEGEND= text |
✓ |
|
Specifies plot symbol for clipped points |
||
Specifies symbol marker height for clipped points |
||
Specifies color for clipped points on overlays |
||
Specifies symbol for clipped points on overlays |
||
Specifies symbol height for clipped points on overlays |
||
Options for Box Plots Produced Using Styles |
||
Groups block legends whose backgrounds are filled with colors from style |
✓ |
|
Groups boxes whose outlines are drawn with colors from style |
||
Groups boxes that are filled with colors from style |
||
Options for ODS Graphics Output |
||
Specifies a footnote displayed in ODS Graphics output |
✓ |
|
Specifies a secondary footnote displayed in ODS Graphics output |
✓ |
|
Specifies a title displayed in ODS Graphics output |
✓ |
|
Specifies a secondary title displayed in ODS Graphics output |
✓ |
Following are explanations of the options you can specify in the PLOT statement after a slash (/). Only those options marked with † are applicable when ODS Graphics is enabled.