此为 Mathematica 7 文档,内容基于更早版本的 Wolfram 语言
查看最新文档(版本11.1)

BoxWhiskerPlot

BoxWhiskerPlot[data]
creates a box-and-whisker plot of the given vector of data.
BoxWhiskerPlot[data1, data2, ...]
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.
  • BoxWhiskerPlot 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.
  • BoxWhiskerPlot 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 0.5.
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]=