BOX Subcommand (IGRAPH command)
BOX
creates
a boxplot, sometimes called a box-and-whiskers plot, showing the median,
quartiles, and outlier and extreme values for a scale variable. The
interquartile range (IQR) is the difference between the 75th and 25th
percentiles and corresponds to the length of the box.
The following keywords are available:
OUTLIERS. Indicates
whether outliers should be displayed. Outliers are values
between 1.5 IQR’s and 3 IQR’s from the end of a box.
By default, the boxplot displays outliers (ON
).
EXTREME. Indicates
whether extreme values should be displayed. Values more
than 3 IQR’s from the end of a box are defined as extreme.
By default, the boxplot displays extreme values (ON
).
MEDIAN. Indicates
whether a line representing the median should be included in the box. By default, the boxplot displays the median line (ON
).
BOXBASE. This keyword is no longer supported and is ignored.
WHISKER. Controls the
appearance of the whiskers. Whiskers can be straight lines
(LINE
) or end in a T-shape (T
). FANCY
is no longer supported
and is ignored.
CAPWIDTH(pct). Controls the
width of the whisker cap relative to the corresponding box. Pct
equals the percentage of
the box width. The default value for pct
is 45.
Example
IGRAPH
/X1=VAR(region) TYPE=CATEGORICAL
/Y=VAR(sales96) TYPE=SCALE
/COORDINATE=HORIZONTAL
/BOX OUTLIERS=ON EXTREME=ON MEDIAN=ON WHISKER=LINE.
-
X1
assigns the variable region to the X1 axis. -
Y
assigns the variable sales96 to the range axis. -
COORDINATE
positions the range axis along the horizontal dimension. -
BOX
creates a boxplot. The outliers and extreme vales are shown. In addition, a line representing the median is added to the box. -
WHISKER
yields whiskers ending in a straight lines.
Example
IGRAPH
/X1=VAR(region) TYPE=CATEGORICAL
/Y=VAR(sales96) TYPE=SCALE
/X2=VAR(division) TYPE=CATEGORICAL
/COORDINATE=THREE
/BOX OUTLIERS=OFF EXTREME=ON MEDIAN=OFF WHISKER=T.
-
X2
adds a third dimension, corresponding to division, to the boxplot in the previous example. -
COORDINATE
indicates that the chart displays the third dimension. -
BOX
creates a boxplot without outliers or a median line. Extreme values are shown.