Statistical Plots Package >

BoxWhiskerPlot

As of Version 8.0, has been renamed to BoxWhiskerChart and is part of the built-in Mathematica kernel.
BoxWhiskerPlot[data]
creates a box-and-whisker plot of the given vector of data.

creates multiple box-and-whisker plots.
BoxWhiskerPlot[matrix]
also creates multiple box-and-whisker plots, with each column of the matrix used for a separate box.
  • creates a plot with a box that spans the distance between two quantiles surrounding the median with lines ("whiskers") that extend to span either the full dataset or the dataset excluding outliers.
  • The default box spans from the 0.25 quantile to the 0.75 quantile.
  • Quantiles used are equivalent to those computed using Quantile.
  • Near outliers are defined as points beyond times the interquantile range from the edge of the box. Far outliers are defined as points beyond three times that range.
  • has the same options as Graphics, with the following additions and changes:
BoxExtraSpacing0extra space to place between boxes
BoxFillingStyleAutomaticcolors to use for the boxes
BoxLabelsAutomaticlabels for the boxes
BoxLineStyleAutomaticstyles to use for lines in the graph
BoxMedianStyleAutomaticadditional styles for the median line
BoxOrientationVerticalorientation of the plot
BoxOutlierMarkersAutomaticmarkers for outlier points
BoxOutliersNonewhich outliers to indicate
BoxQuantile0.25distance of quantile from median for box edges
FrameTruewhether to put a frame around the plot
  • Valid settings for BoxQuantile are numbers between zero and .
A box-and-whisker plot for a standard normal sample:
A box-and-whisker plot for a normal sample and a uniform sample:
Needs["StatisticalPlots`"]
A box-and-whisker plot for a standard normal sample:
In[2]:=
Click for copyable input
Out[2]=
A box-and-whisker plot for a normal sample and a uniform sample:
In[3]:=
Click for copyable input
In[4]:=
Click for copyable input
Out[4]=
A default box-and-whisker plot for 2 datasets:
Add an additional box width between the plots:
Give explicit labels for plots:
Use dashed rather than solid lines in the plot:
Display the median line as a dashed line:
Orient the graphic horizontally:
Mark near and far outliers identically:
Use triangles for near outliers and squares for far outliers:
Use triangles for near outliers and squares for far outliers:
The default covers the middle 50% of the data:
Cover the middle 90%:
Use a light gray to shade the box:
Ask a question about this page  |  Suggest an improvement  |  Leave a message for the team
Format:   HTML  |  CDF