| TEMPLATE Procedure: Plot Statements (Experimental) |
| BOXPLOTPARM Y= numeric-column | expression STAT= string-column < / option(s)> ; |
| BOXPLOTPARM Y= numeric-column | expression STAT= string-column X= column | expression < / option(s)> ; |
| Usage Information |
Box Plot
![[Box Plot]](./images/boxplot.gif)
| Tip: |
For a more information about box-and-whisker plots, see BOXPARM and BOXPLOTPARM Statement Box-and-Whisker Plots |
| Required Arguments |
specifies the column for the Y values. The Y values must be the statistical values needed for the box plot. At a minimum, there must be non-missing values for the 25th and 75th percentiles.
specifies the statistic that is represented by the value in the Y column. Valid STAT= values include the following:
25th percentile. The data must contain a non-missing value for this percentile.
75th percentile. The data must contain a non-missing value for this percentile.
maximum data value below the upper fence.
minimum data value above the upper fence.
data mean.
data median.
an observation outside the lower and upper fences. The fences are located at a distance 1.5 times the Interquartile Range (IQR = Q3 - Q1) above and below the box. The outliers are labeled when the DATALABEL= option is used.
an observation outside the lower and upper far fences. The far fences are located at a distance 3 times the Interquartile Range (IQR = Q3 - Q1) above and below the box. The far outliers are labeled when the DATALABEL= option is used. Specify that LABELFAR=TRUE to label only the far outliers but not the outliers.
subgroup sample size. The N value is not shown in the plot but is used to calculate notch locations when the NOTCHES= option is used.
data standard deviation. The standard deviation value is not shown in the plot but if the tool tips have been activated, then they are displayed in the tool tips.
| Requirement: |
Other STAT values can be omitted
or have missing Y values, but if present, must conform to the following rules
for the plot to be displayed:
|
specifies the column for the X values. The X values must qualify or classify the values in the Y column.
| Options |
| Option | Description |
|---|---|
| BACKGROUND= color | style-reference | Specifies the background color of the graph. |
| BACKTRANSPARENCY= number | Specifies the degree of the transparency of the background color. |
| CAPSHAPE= NONE | SERIF | LINE | BRACKET | Specifies the shape at the ends of the whiskers. |
| CONNECT= NONE | MIN | Q1 | MEDIAN | Q3 | MAX | MEAN | Specifies which statistic is used to connect multiple boxes. |
| DATALABEL= column | Specifies the labels of the values that are identified as outlier or faroutlier by the STAT= column. |
| DATALABELCOLOR= color | style-reference | Specifies the color of the outlier labels. |
| DATALABELFONTFAMILY= 'string' | style-reference | Specifies the family of the font of the outlier labels. |
| DATALABELFONTSIZE= dimension | style-reference | Specifies the size of the font of the outlier labels. |
| DATALABELFONTSTYLE= NORMAL | ITALIC | style-reference | Specifies the style of the font of the outlier labels. |
| DATALABELFONTWEIGHT= NORMAL | BOLD | style-reference | Specifies the weight of the font of the outlier labels. |
| DATALABELFORMAT= format | Specifies the format of the outlier labels. |
| DATATRANSPARENCY= number | Specifies the degree of the transparency of the boxes. |
| EXTREME= boolean | Specifies whether the whiskers can extend beyond the fences. |
| FILL= boolean | Specifies whether to fill the interior of the boxes. |
| FILLCOLOR= color | style-reference | Specifies the color of the interior fill of the boxes. |
| GRIDTRANSPARENCY= number | Specifies the degree of the transparency of the grid lines. |
| LABELFAR= boolean | Specifies whether all outliers or only far outliers are labeled. |
| LABELTRANSPARENCY= number | Specifies the degree of the transparency of the outlier labels. |
| LINECOLOR= color | style-reference | Specifies the color of the connecting lines that are specified by the CONNECT= option. |
| LINEPATTERN= line | style-reference | Specifies the pattern of the connecting lines that are specified by the CONNECT= option. |
| LINETHICKNESS= dimension | style-reference | Specifies the thickness of the connecting lines that are specified by the CONNECT= option. |
| MARKERCOLOR= color | style-reference | Specifies the color of the outlier markers. |
| MARKERS= boolean | Specifies whether the outlier markers are displayed. |
| MARKERSIZE= dimension | style-reference | Specifies the width of the marker, which is equal to the height of the marker. |
| MARKERSYMBOL= marker | style-reference | Specifies the symbol of the marker of the outlier markers. |
| MEANCOLOR= color | style-reference | Specifies the color of the marker that represents the mean values. |
| MEANSIZE= dimension | style-reference | Specifies the size of the marker that represents the mean values. |
| MEANSYMBOL= marker | style-reference | Specifies the symbol of the marker that represents the mean values. |
| MEDIANCOLOR= color | style-reference | Specifies the color of the line that represents the median values. |
| MEDIANSIZE= dimension | style-reference | Specifies the size of the line that represents the median values. |
| NOTCHES= boolean | Specifies whether the boxes are notched. |
| ORIENT= HORIZONTAL | VERTICAL | Specifies the orientation of the Y axis and of the boxes. |
| OUTLINECOLOR= color | style-reference | Specifies the color of the outlines around the boxes. |
| OUTLINEPATTERN= line | style-reference | Specifies the pattern of the outlines around the boxes. |
| OUTLINETHICKNESS= dimension | style-reference | Specifies the thickness of the outlines around the boxes. |
| SORT= X | NONE | Specifies whether to use the X column to sort the input data. |
| TRANSPARENCY= number | Specifies the degree of the transparency of the boxes, background, grid, outlier markers, outlier labels, wall, and axis features, if displayed in a graph. |
| WALLTRANSPARENCY= number | Specifies the degree of the transparency of the plot wall or walls. |
| WHISKERCOLOR= color | style-reference | Specifies the color of the whiskers. |
| WHISKERPATTERN= line | style-reference | Specifies the pattern of the whiskers. |
| WHISKERTHICKNESS= dimension | style-reference | Specifies the thickness of the whiskers. |
| XAXIS= X | X2 | Specifies whether data is mapped to the primary X axis or the secondary X (X2) axis. |
| XAXISOPTS= ( axis-options ) | Specifies one or more X axis options. |
| XGRID= boolean | Specifies whether the grid lines are drawn at the tick marks. |
| XOFFSETMAX= number | Specifies an offset to add to the end that represents high data values on the primary X axis. |
| XOFFSETMIN= number | Specifies an offset to add to the end that represents low data values on the primary X axis. |
| YAXIS= Y | Y2 | Specifies whether data is mapped to the primary Y axis or the secondary Y (Y2) axis. |
| YAXISOPTS= ( axis-options ) | Specifies one or more Y axis options. |
| YGRID= boolean | Specifies whether the grid lines drawn at the tick marks. |
| YOFFSETMAX= number | Specifies an offset to add to the end that represents high data values on the primary Y axis. |
| YOFFSETMIN= number | Specifies an offset to add to the end that represents low data values on the primary Y axis. |
specifies the background color of the graph.
| Default: | Specified by the GraphBackground:Background style reference. |
| Interaction: | Ignored in a LAYOUT OVERLAY block. For information, see Ignored Plot Options in a LAYOUT OVERLAY Block. |
specifies the degree of the transparency of the background color.
| Default: | 0 |
| Range: | 0 (opaque) to 1 (entirely transparent) |
| Interaction: | The BACKTRANSPARENCY= option overrides the TRANSPARENCY= option for the background. |
| Interaction: | Ignored in a LAYOUT OVERLAY block. For information, see Ignored Plot Options in a LAYOUT OVERLAY Block. |
| See also: | TRANSPARENCY= option |
specifies the shape at the ends of the whiskers.
specifies that short lines are drawn at right angles at the ends of the whiskers.
specifies that serifs are extended for the width of the box.
specifies that lines with short vertical extensions are drawn in the direction of the box.
| Default: | LINE |
| Interaction: | The cap color and the thickness are specified by the WHISKERCOLOR= and WHISKERTHICKNESS= options. |
| Interaction: | The cap pattern is always solid. |
specifies which statistic is used to connect multiple boxes.
| Default: | NONE |
| Interaction: | The CONNECT= option only applies when the X argument is used to generate multiple boxes. |
specifies the labels of the values that are identified as outlier or faroutlier by the STAT= column.
| Default: | No labels are displayed. |
| See also: | LABELFAR= option |
specifies the color of the outlier labels.
| Default: | Specified by the GraphDataDefault:ContrastColor style reference. |
specifies the family of the font of the outlier labels.
| Default: | Specified by the GraphDataText:Font_Face style reference. |
| Restriction: | You must specify one font family name. You cannot specify a list of font family names. |
specifies the size of the font of the outlier labels.
| Default: | Specified by the GraphDataText:Font_Size style reference. |
specifies the style of the font of the outlier labels.
| Default: | Specified by the GraphDataText:Font_Style style reference. |
specifies the weight of the font of the outlier labels.
| Default: | Specified by the GraphDataText:Font_Weight style reference. |
specifies the format of the outlier labels.
| Default: | The format of the data label uses the format of the column. For an unformatted numeric column, the data label uses the BEST12 format. |
| Restriction: | The w.d format must be specified using the Fw.d format. |
specifies the degree of the transparency of the boxes.
| Default: | 0 |
| Range: | 0 (opaque) to 1 (entirely transparent) |
| Interaction: | The DATATRANSPARENCY= option overrides the TRANSPARENCY= option for the boxes. |
| See also: | TRANSPARENCY= option |
specifies whether the whiskers can extend beyond the fences.
| Default: | FALSE |
| Tip: |
If EXTREME=FALSE, then the whiskers are
drawn from the upper edge of the box to the MAX value, and from the lower
edge of the box to the MIN value.
If EXTREME=TRUE, then the whiskers are drawn to the largest and smallest data values, whether these values are inside or outside the fences. The outliers and far outliers are not displayed and are not labeled. |
| Tip: | Fences are locations above and below the box. The upper and lower fences are located at a distance 1.5 times the Interquartile Range (IQR) ( IQR = Q3 - Q1 ). The upper and lower far fences are located at a distance 3 times the IQR. |
specifies whether to fill the interior of the boxes.
| Default: | FALSE |
specifies the color of the interior fill of the boxes.
| Default: | Specified by the GraphDataDefault:Foreground style reference. |
specifies the degree of the transparency of the grid lines.
| Default: | 0 |
| Range: | 0 (opaque) to 1 (entirely transparent) |
| Interaction: | The GRIDTRANSPARENCY= option overrides the TRANSPARENCY= option for the grid lines. |
| Interaction: | Ignored in a LAYOUT OVERLAY block. For information, see Ignored Plot Options in a LAYOUT OVERLAY Block. |
| See also: | TRANSPARENCY= option |
specifies whether all outliers or only far outliers are labeled.
| Default: | FALSE |
| Interaction: | If EXTREME=TRUE, then the LABELFAR= option is ignored. |
| Tip: |
If LABELFAR=FALSE, then the labels specified
by the DATALABEL= option apply to values that the STAT column identifies as
an outlier and to values that the STAT column identifies as a far outlier.
If LABELFAR=TRUE, then the labels specified by the DATALABEL= option only apply to values that the STAT column identifies as a far outlier. |
specifies the percentage of the transparency of the data labels.
| Default: | 0 |
| Range: | 0 (opaque) to 1 (entirely transparent) |
| Interaction: | The LABELTRANSPARENCY= option overrides the TRANSPARENCY= option for the data labels. |
specifies the color of the connecting line that are specified by the CONNECT= option.
| Default: | Specified by the OUTLINECOLOR= option. |
specifies the pattern of the connecting lines that are specified by the CONNECT= option.
| Default: | SOLID |
specifies the thickness of the connecting lines that are specified by the CONNECT= option.
| Default: | 1px |
specifies the color of the outlier markers.
| Default: | Specified by the GraphDataDefault:ContrastColor style reference. |
specifies whether the outlier markers are displayed.
| Default: | TRUE |
| Interaction: | If EXTREME=TRUE, then the outliers are not displayed. |
specifies the marker width, which is equal to the marker height.
| Default: | 8px |
specifies the marker symbol of the outlier markers.
| Default: | CIRCLE |
specifies the color of the marker that represents the mean values.
| Default: | Specified by the GraphDataDefault:ContrastColor style reference. |
specifies the size of the marker that represents the mean values.
| Default: | 12px |
specifies the symbol of the marker that represents the mean values.
| Default: | DIAMOND |
specifies the color of the line that represents the median values.
| Default: | Specified by the GraphDataDefault:ContrastColor style reference. |
specifies the size of the line that represents the median values.
| Default: | 1px |
specifies whether the boxes are notched.
| Tip: |
The endpoints of the notches are at the
following computed locations.
In the equation, the IQR is the interquartile range and N is the sample size. The medians (central lines) of the two boxes are significantly different at approximately the 0.05 level if the corresponding notches do not overlap.
|
specifies the orientation of the Y axis and of the boxes.
| Default: | VERTICAL |
specifies the color of the outlines around the boxes.
| Default: | Specified by the GraphOutlines:Foreground style reference. |
specifies the pattern of the outlines around the boxes.
| Default: | SOLID |
specifies the thickness of the outlines around the boxes.
| Default: | 1px |
specifies whether to use the X column to sort the input data.
| Default: | NONE |
specifies the degree of the transparency of the boxes, background, grid, outlier markers, outlier labels, wall, and axis features, if displayed in a graph.
| Default: | 0 |
| Range: | 0 (opaque) to 1 (entirely transparent) |
| Interaction: | You can specify the transparency of individual graph elements by using the BACKTRANSPARENCY=, DATATRANSPARENCY=, GRIDTRANSPARENCY=, LABELTRANSPARENCY=, and WALLTRANSPARENCY= options. The value specified by the TRANSPARENCY= option is only applied to the transparencies that you do not specify individually. |
| Interaction: | In a LAYOUT OVERLAY block, the TRANSPARENCY= option only affects the outlier markers and their labels. The LAYOUT OVERLAY statement specifies the transparency of the background, grid, and wall of the graph. |
specifies the degree of the transparency of the plot wall.
| Default: | 0 |
| Range: | 0 (opaque) to 1 (entirely transparent) |
| Interaction: | The WALLTRANSPARENCY= option overrides the TRANSPARENCY= option for the graph wall. |
| Interaction: | Ignored in a LAYOUT OVERLAY block. For information, see Ignored Plot Options in a LAYOUT OVERLAY Block. |
| See also: | TRANSPARENCY= option |
specifies the color of the whiskers.
| Default: | Specified by the OUTLINECOLOR= option. |
specifies the pattern of the whiskers.
| Default: | SOLID |
specifies the thickness of the whiskers.
| Default: | 1 px |
specifies whether data is mapped to the primary X axis or to the secondary X (X2) axis.
| Default: | X |
| Interaction: |
Outside of a LAYOUT OVERLAY block,
an individual plot can have only one X axis. The XAXIS= option of a plot specifies
whether the axis is in the primary (bottom) or secondary (top) position. The
XAXISOPTS= option of a plot specifies whether the axis is displayed and specifies
the axis characteristics.
Within a LAYOUT OVERLAY block, multiple plots can share a primary axis and a secondary axis. The primary and secondary axes can have different scales, and the XAXIS= option for a particular plot can map data to either axis. The XAXISOPTS= and X2AXISOPTS= options of a LAYOUT OVERLAY statement specify whether the axes are displayed, and specify the axis characteristics. |
specifies one or more X axis options.
| Requirement: | The list of axis options must be enclosed in parentheses and separated by spaces. |
| Interaction: | Ignored in a LAYOUT OVERLAY block. For information, see Ignored Plot Options in a LAYOUT OVERLAY Block. |
specifies whether the grid lines are drawn at the tick marks.
| Default: | FALSE | ||||||
| Interaction: | Ignored in a LAYOUT OVERLAY block. For information, see Ignored Plot Options in a LAYOUT OVERLAY Block. | ||||||
| Interaction: |
If you specify or use the default
XGRID= option for the OVERLAY LAYOUT statement, then the XGRID= option specified
for a graph is ignored. Default characteristics for the grid lines are specified
from the following attributes on the GraphGridLines style element:
|
specifies an offset to add to the end that represents high data values on the primary X axis. The offset is expressed as a decimal proportion of the full axis length. For a continuous axis, the offset is added to the highest data value or highest tick value, whichever is greater. For a discreet axis, the offset is added to the highest data value, which is always the highest tick value.
| Default: | Generated as suitable for the graph. |
| Range: | 0 - 1 |
| Interaction: | For a continuous axis, the offset is added after any threshold adjustment is made to the axis. |
| Interaction: | Ignored in a LAYOUT OVERLAY block. For information, see Ignored Plot Options in a LAYOUT OVERLAY Block. |
| Main discussion: | THRESHOLDMAX= sub-option. |
specifies an offset to add to the end that represents low data values on the primary X axis. The offset is expressed as a decimal proportion of the full axis length. For a continuous axis, the offset is added to the lowest data value or lowest tick value, whichever is less. For a discreet axis, the offset is added to the lowest data value, which is always the lowest tick value.
| Default: | Generated as suitable for the graph. |
| Range: | 0 - 1 |
| Interaction: | For a continuous axis, the offset is added after any threshold adjustment is made to the axis. |
| Interaction: | Ignored in a LAYOUT OVERLAY block. For information, see Ignored Plot Options in a LAYOUT OVERLAY Block. |
| Main discussion: | THRESHOLDMAX= sub-option. |
specifies whether data is mapped to the primary Y axis or to the secondary Y (Y2) axis.
| Default: | Y |
| Interaction: |
Outside of a LAYOUT OVERLAY block,
an individual plot can have only one Y axis. The YAXIS= option of a plot
specifies whether the axis is in the primary (left) or secondary (right) position.
The YAXISOPTS= option of a plot specifies whether the axis is displayed and
specifies the axis characteristics.
Within a LAYOUT OVERLAY block, multiple plots can share a primary axis and a secondary axis. The primary and secondary axes can have different scales, and the YAXIS= option for a particular plot can map data to either axis. The YAXISOPTS= and Y2AXISOPTS= options of a LAYOUT OVERLAY statement specify whether the axes are displayed, and specify the axis characteristics. |
specifies one or more Y axis options.
| Requirement: | The list of axis options must be enclosed in parentheses and separated by spaces. |
| Interaction: | Ignored in a LAYOUT OVERLAY block. For information, see Ignored Plot Options in a LAYOUT OVERLAY Block. |
specifies whether grid lines are drawn at the tick marks.
| Default: | FALSE | ||||||
| Interaction: | Ignored in a LAYOUT OVERLAY block. For information, see Ignored Plot Options in a LAYOUT OVERLAY Block. | ||||||
| Interaction: |
If you specify or use the default
YGRID= option for the OVERLAY LAYOUT statement, then the YGRID= option specified
for a graph is ignored. Default characteristics for the grid lines are specified
from the following attributes on the GraphGridLines style element:
|
specifies an offset to add to the end that represents high data values on the primary Y axis. The offset is expressed as a decimal proportion of the full axis length. For a continuous axis, the offset is added to the highest data value or highest tick value, whichever is greater. For a discreet axis, the offset is added to the highest data value, which is always the highest tick value.
| Default: | Generated as suitable for the graph. |
| Range: | 0 - 1 |
| Interaction: | For a continuous axis, the offset is added after any threshold adjustment is made to the axis. |
| Interaction: | Ignored in a LAYOUT OVERLAY block. For information, see Ignored Plot Options in a LAYOUT OVERLAY Block. |
| Main discussion: | THRESHOLDMAX= sub-option. |
specifies an offset to add to the end that represents low data values on the primary Y axis. The offset is expressed as a decimal proportion of the full axis length. For a continuous axis, the offset is added to the lowest data value or lowest tick value, whichever is less. For a discreet axis, the offset is added to the lowest data value, which is always the lowest tick value.
| Default: | Generated as suitable for the graph. |
| Range: | 0-1 |
| Interaction: | For a continuous axis, the offset is added after any threshold adjustment is made to the axis. |
| Interaction: | Ignored in a LAYOUT OVERLAY block. For information, see Ignored Plot Options in a LAYOUT OVERLAY Block. |
| Main discussion: | THRESHOLDMAX= sub-option. |