WOLFRAM

BoxWhiskerChart[{x1,x2,}]

makes a boxandwhisker chart for the values xi.

BoxWhiskerChart[{x1,x2,},bwspec]

makes a chart with boxandwhisker symbol specification bwspec.

BoxWhiskerChart[{data1,data2,},]

makes a chart with boxandwhisker symbol for each datai.

BoxWhiskerChart[{{data1,data2,},},]

makes a boxandwhisker chart from multiple groups of datasets {data1,data2,}.

Details and Options

Examples

open allclose all

Basic Examples  (6)Summary of the most common use cases

Generate a box-and-whisker chart for a data vector:

Out[1]=1

Generate a box-and-whisker chart for a list of data vectors:

Out[2]=2

Chart several collections of datasets:

Out[2]=2

Customize the appearance of the box-and-whisker chart:

Out[2]=2

Show outliers:

Out[3]=3

Use categorical labels:

Out[2]=2

Categorical legends:

Out[3]=3

Show outliers:

Out[2]=2

Show notches for the median confidence interval:

Out[3]=3

Scope  (46)Survey of the scope of standard use cases

Data and Wrappers  (17)

Single data vector:

Out[1]=1

Multiple data vectors:

Out[1]=1

Data vectors in a dataset are grouped together:

Out[2]=2

Datasets do not need to have the same number of data vectors:

Out[2]=2

Nonreal data is taken to be missing and typically yields a gap in the box-and-whisker chart:

Out[2]=2

A nonreal entry in a data vector is omitted:

Out[1]=1

The data may include units:

Out[1]=1

Specify the units to use:

Out[1]=1

The time stamps in TimeSeries, EventSeries, and TemporalData are ignored:

Out[2]=2

The values in associations are taken as the heights of the bars:

Out[2]=2

Use the keys as labels:

Out[3]=3

Use the keys as legends:

Out[4]=4

Associations can be nested:

Out[2]=2

Use WeightedData to add weights to data:

Out[2]=2
Out[3]=3

Use EventData to add censoring and truncation information:

Out[4]=4
Out[5]=5

Use wrappers on an individual data vector, datasets, or collections of datasets:

Out[2]=2

Inner wrappers take precedence over outer wrappers:

Out[2]=2

Override the default tooltips:

Out[2]=2

Use PopupWindow to provide additional drilldown information:

Out[2]=2

Use the other charting function in PopupWindow to provide more information:

Out[3]=3

Button can be used to trigger any action:

Out[2]=2

Tabular Data  (1)

Get tabular data:

Out[11]=11

Generate a box-whisker chart for flipper lengths:

Out[12]=12

Create a table with flipper lengths divided into columns by species:.

Out[13]=13

Compare flipper lengths by species:

Out[14]=14

Use abbreviated names for extended keys when the elements are unique:

Out[15]=15

Elements  (11)

Use named presets:

Out[2]=2

Style the whiskers:

Out[2]=2

Vary the width of the fences:

Out[2]=2

Style the fences:

Out[3]=3

Use different shapes for outliers:

Out[2]=2

Style the outliers:

Out[3]=3

Use different shapes for far outliers:

Out[2]=2

Style the far outliers:

Out[3]=3

Vary the width of the median marker:

Out[2]=2

Style the median marker:

Out[3]=3

Use a different shape of median marker:

Out[4]=4

Do not show the median marker:

Out[5]=5

Vary the width of the median confidence interval:

Out[2]=2

Style the median confidence interval:

Out[3]=3

Vary the width of the mean marker:

Out[2]=2

Style the mean marker:

Out[3]=3

Use a different shape of mean marker:

Out[4]=4

Vary the width of the mean confidence interval:

Out[2]=2

Style the mean confidence interval:

Out[3]=3

Combine individual elements with named presets:

Out[2]=2
Out[3]=3
Out[4]=4

Combine elements with ChartElementFunction:

Out[2]=2

Styling and Appearance  (9)

Use an explicit list of styles for the box-and-whiskers:

Out[2]=2

Use any gradient or indexed color schemes from ColorData:

Out[2]=2

Use color schemes designed for charting:

Out[1]=1
Out[3]=3

ChartBaseStyle can be used to set an initial style for all chart elements:

Out[2]=2

Style can be used to override styles:

Out[2]=2

Use built-in programmatically generated bars:

Out[1]=1
Out[3]=3

For detailed settings use Palettes ChartElementSchemes:

Out[4]=4

Use a theme with simple ticks and grid lines:

Out[2]=2

Use a theme with detailed ticks and a reference line:

Out[3]=3

Change the origin of box-and-whiskers:

Out[2]=2

Adjust the spacing between individuals and groups of box-and-whiskers:

Out[2]=2

Labeling and Legending  (8)

Use Labeled to add a label to a box-and-whisker:

Out[2]=2

Use symbolic positions for label placement:

Out[2]=2
Out[3]=3

Provide categorical labels for the columns of data:

Out[2]=2

For rows of data:

Out[3]=3

For both:

Out[4]=4

Use Placed to control the positioning of labels, using the same positions as for Labeled:

Out[2]=2

Provide value labels for box-and-whisker by using LabelingFunction:

Out[2]=2

Use Placed to control placement and formatting:

Out[4]=4

Add categorical legend entries for the columns of data:

Out[2]=2

For rows of data:

Out[3]=3

Use Legended to add additional legend entries:

Out[2]=2
Out[3]=3

Use Placed to affect the positioning of legends:

Out[2]=2

Options  (96)Common values & functionality for each option

AspectRatio  (3)

By default, AspectRatio uses a fixed ratio of the height to the width of the plot:

Out[3]=3

Make the height the same as the width with AspectRatio1:

Out[1]=1

AspectRatioFull adjusts the height and width to tightly fit inside other constructs:

Out[2]=2

Axes  (4)

By default, BoxWhiskerChart uses a frame instead of axes:

Out[1]=1

Use axes instead of a frame:

Out[1]=1

Use AxesOrigin to specify where the axes intersect:

Out[1]=1

Turn each axis on individually:

Out[1]=1

AxesLabel  (4)

No axes labels are drawn by default:

Out[2]=2

Place a label on the axis:

Out[1]=1

Specify axes labels:

Out[1]=1

Use units as labels:

Out[1]=1

AxesOrigin  (2)

The position of the axes is determined automatically:

Out[1]=1

Specify an explicit origin for the axes:

Out[1]=1

AxesStyle  (4)

Change the style for the axes:

Out[3]=3

Specify the style of each axis:

Out[1]=1

Use different styles for the ticks and the axes:

Out[1]=1

Use different styles for the labels and the axes:

Out[1]=1

BarOrigin  (1)

Change the bar origin:

Out[2]=2
Out[3]=3

BarSpacing  (4)

BoxWhiskerChart automatically selects the spacing between bars:

Out[1]=1

With groups of data:

Out[2]=2

Use symbolic spacing:

Out[1]=1

With groups of data:

Out[2]=2

Use explicit spacing between bars:

Out[1]=1

With groups of data:

Out[2]=2

Use no bar spacing:

Out[1]=1

Within groups of data:

Out[2]=2

ChartBaseStyle  (3)

Use ChartBaseStyle to style box-and-whisker charts:

Out[1]=1

ChartBaseStyle combines with ChartStyle:

Out[1]=1

ChartStyle may override settings for ChartBaseStyle:

Out[1]=1

ChartElementFunction  (3)

Get a list of built-in settings for ChartElementFunction:

Out[1]=1

For detailed settings, use Palettes ChartElementSchemes:

Out[1]=1

Use named specifications with ChartElementFunction:

Out[1]=1

ChartLabels  (9)

By default labels are placed under the frame:

Out[1]=1

Use Placed to control label placement:

Out[1]=1

Symbolic positions outside the bar:

Out[1]=1
Out[2]=2

Use positions relative to the box-and-whisker charts:

Out[1]=1

Use group labels to label groups:

Out[1]=1

Coordinate-based placement relative to a bar:

Out[1]=1

Place all labels at the upper-right corner and vary the coordinates within the label:

Out[1]=1

Use the third argument to Placed to control formatting:

Out[1]=1
Out[2]=2
Out[3]=3

Place multiple labels:

Out[1]=1

ChartLegends  (1)

Generate a legend based on chart style:

Out[1]=1

Place the legend below the chart:

Out[2]=2

ChartStyle  (5)

Use ChartStyle to style the bars:

Out[1]=1

Give a list of styles:

Out[1]=1

Use "Gradient" colors from ColorData:

Out[2]=2

Use "Indexed" colors from ColorData:

Out[3]=3

Styles are used cyclically:

Out[1]=1

Style datasets in a group:

Out[1]=1

Style groups of datasets:

Out[2]=2

Element styles override ChartStyle:

Out[1]=1

Frame  (4)

BoxWhiskerChart uses a frame by default:

Out[1]=1

Use FrameFalse to turn off the frame:

Out[1]=1

Draw a frame on the left and right edges:

Out[1]=1

Draw a frame on the left and bottom edges:

Out[1]=1

FrameLabel  (3)

Place a label along the bottom frame of a chart:

Out[1]=1

Frame labels are placed on the bottom and left frame edges by default:

Out[1]=1

Place labels on each of the edges in the frame:

Out[1]=1

FrameStyle  (2)

Specify a style for the frame:

Out[1]=1

Specify style for each frame edge:

Out[1]=1

FrameTicks  (6)

Frame ticks are placed automatically by default:

Out[1]=1

Use All to include tick labels on both left and right edges:

Out[1]=1

Place tick marks at the specified positions:

Out[1]=1

Draw frame tick marks at the specified positions with specific labels:

Out[1]=1

Specify the lengths for tick marks as a fraction of the graphics size:

Out[1]=1

Use different sizes in the positive and negative directions for each tick mark:

Out[2]=2

Specify a style for each frame tick:

Out[1]=1

FrameTicksStyle  (3)

By default, frame ticks and frame tick labels use the same styles as the frame:

Out[1]=1

Specify an overall style for the ticks, including the labels:

Out[1]=1

Use a different style for each frame edge:

Out[1]=1

ImageSize  (7)

Use named sizes such as Tiny, Small, Medium and Large:

Out[1]=1

Specify the width of the plot:

Out[1]=1

Specify the height of the plot:

Out[2]=2

Allow the width and height to be up to a certain size:

Out[1]=1

Specify the width and height for a graphic, padding with space if necessary:

Out[1]=1

Setting AspectRatioFull will fill the available space:

Out[2]=2

Use maximum sizes for the width and height:

Out[1]=1

Use ImageSizeFull to fill the available space in an object:

Out[1]=1

Specify the image size as a fraction of the available space:

Out[1]=1

Joined  (1)

Join the medians of the datasets:

Out[1]=1

LabelingFunction  (2)

By default, bars have tooltips with a summary table of the data:

Out[1]=1

Define a labeling function and place it in a tooltip:

Out[2]=2

LabelingSize  (4)

Textual labels are shown at their actual sizes:

Out[1]=1

Image labels are automatically resized:

Out[1]=1

Specify a maximum size for textual labels:

Out[1]=1

Specify a maximum size for image labels:

Out[2]=2

Show image labels at their natural sizes:

Out[1]=1

Method  (3)

Use bar widths proportional to the square root of the data sizes:

Out[2]=2

Use bar widths proportional to the data sizes:

Out[3]=3

Put bars on fixed positions with varying bar spacing:

Out[4]=4

Use constant-width bars:

Out[5]=5

BoxWhiskerChart uses Quartiles to calculate quartiles and extremes:

Out[2]=2
Out[3]=3

Use Quantile instead:

Out[4]=4
Out[5]=5

Use Quantile with parameters for mode-based estimates:

Out[6]=6
Out[7]=7

Create a box-whisker plot using precomputed statistics:

Out[2]=2
Out[3]=3

PerformanceGoal  (3)

Generate a box-and-whisker chart with interactive highlighting:

Out[1]=1

Emphasize performance by disabling interactive behaviors:

Out[1]=1

Typically less memory is required for non-interactive charts:

Out[2]=2

PlotTheme  (2)

Use a theme with a high contrast color scheme and glassy rectangle boxes:

Out[2]=2

Change the chart style:

Out[2]=2

ScalingFunctions  (3)

Linear scale is used by default:

Out[1]=1

Use log scale in the coordinate:

Out[1]=1

When logarithm scale is used, non-positive data is dropped automatically:

Out[1]=1
Out[2]=2

Ticks  (6)

Ticks are placed automatically for each axis:

Out[1]=1

Use TicksNone to draw axes without any tick marks:

Out[1]=1

Place tick marks at the specified positions:

Out[1]=1

Draw tick marks at the specified positions with specific labels:

Out[1]=1

Specify the lengths for ticks as a fraction of graphics size:

Out[1]=1

Use different sizes in the positive and negative directions for each tick:

Out[2]=2

Specify a style for each tick:

Out[1]=1

TicksStyle  (4)

By default, the ticks and tick labels use the same styles as the axis:

Out[1]=1

Specify an overall style for the ticks including tick labels:

Out[1]=1

Specify ticks style for each of the axes:

Out[1]=1

Use a different style for the tick labels and tick marks:

Out[1]=1

Applications  (3)Sample problems that can be solved with this function

Compare the distribution of salaries for several departments at a university:

Out[2]=2

A -test for equal location of two populations effectively checks for overlap in confidence intervals about their means. BoxWhiskerChart can be used to perform a visual -test:

The mean diamonds do not overlap. The null hypothesis is rejected at the 5% level:

Out[2]=2
Out[3]=3

The mean diamonds overlap. There is not enough evidence to reject the null hypothesis:

Out[4]=4
Out[5]=5

Compare different time slices of a random process:

Out[2]=2

Properties & Relations  (6)Properties of the function, and connections to other functions

Outliers and far outliers are defined using the quartiles and interquartile range:

Out[2]=2
Out[3]=3
Out[4]=4

Use DistributionChart to show distribution of data:

Out[2]=2

BoxWhiskerChart is a case of DistributionChart:

Out[2]=2

Use Histogram and SmoothHistogram to visualize a list of data vectors:

Out[2]=2

Use QuantilePlot and ProbabilityPlot to compare data to distributions:

Out[2]=2

Use Histogram3D and SmoothHistogram3D to visualize two-dimensional data vectors:

Out[2]=2
Wolfram Research (2010), BoxWhiskerChart, Wolfram Language function, https://reference.wolfram.com/language/ref/BoxWhiskerChart.html (updated 2025).
Wolfram Research (2010), BoxWhiskerChart, Wolfram Language function, https://reference.wolfram.com/language/ref/BoxWhiskerChart.html (updated 2025).

Text

Wolfram Research (2010), BoxWhiskerChart, Wolfram Language function, https://reference.wolfram.com/language/ref/BoxWhiskerChart.html (updated 2025).

Wolfram Research (2010), BoxWhiskerChart, Wolfram Language function, https://reference.wolfram.com/language/ref/BoxWhiskerChart.html (updated 2025).

CMS

Wolfram Language. 2010. "BoxWhiskerChart." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2025. https://reference.wolfram.com/language/ref/BoxWhiskerChart.html.

Wolfram Language. 2010. "BoxWhiskerChart." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2025. https://reference.wolfram.com/language/ref/BoxWhiskerChart.html.

APA

Wolfram Language. (2010). BoxWhiskerChart. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/BoxWhiskerChart.html

Wolfram Language. (2010). BoxWhiskerChart. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/BoxWhiskerChart.html

BibTeX

@misc{reference.wolfram_2025_boxwhiskerchart, author="Wolfram Research", title="{BoxWhiskerChart}", year="2025", howpublished="\url{https://reference.wolfram.com/language/ref/BoxWhiskerChart.html}", note=[Accessed: 31-March-2025 ]}

@misc{reference.wolfram_2025_boxwhiskerchart, author="Wolfram Research", title="{BoxWhiskerChart}", year="2025", howpublished="\url{https://reference.wolfram.com/language/ref/BoxWhiskerChart.html}", note=[Accessed: 31-March-2025 ]}

BibLaTeX

@online{reference.wolfram_2025_boxwhiskerchart, organization={Wolfram Research}, title={BoxWhiskerChart}, year={2025}, url={https://reference.wolfram.com/language/ref/BoxWhiskerChart.html}, note=[Accessed: 31-March-2025 ]}

@online{reference.wolfram_2025_boxwhiskerchart, organization={Wolfram Research}, title={BoxWhiskerChart}, year={2025}, url={https://reference.wolfram.com/language/ref/BoxWhiskerChart.html}, note=[Accessed: 31-March-2025 ]}