This is documentation for Mathematica 8, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.1)

DistributionChart

DistributionChart
makes a distribution chart with a distribution symbol for each .
DistributionChart
makes a distribution chart with symbol features defined by the symbolic wrappers .
DistributionChart
makes a distribution chart from multiple groups of datasets .
dataia pure dataset
wi[datai,...]data with wrapper
formi->midata with metadata
  • Each should be a list of real numbers . Elements that are not real numbers are taken to be missing and are excluded. If is not a list of real numbers it is taken to be missing data and will typically result in a gap in the box-and-whisker chart.
{data1,data2,...}list of elements with or without wrappers
w[{data1,data2,...},...]wrapper applied to a grouped dataset
w[{{data1,data1,...},...},...]wrapper applied to all grouped datasets
AspectRatio1/GoldenRatiooverall ratio of width to height
AxesTruewhether to draw axes
BarOriginBottomorigin placement for shapes
BarSpacingAutomaticfractional spacing between shapes
ChartBaseStyleAutomaticoverall style for shapes
ChartElementFunctionAutomatichow to generate raw graphics for shapes
ChartLabelsNonelabels for data elements and datasets
ChartLayoutAutomaticoverall layout to use
ChartLegendsNonelegends for data elements and datasets
ChartStyleAutomaticstyle for shapes
LabelingFunctionAutomatichow to label shapes
LegendAppearanceAutomaticoverall appearance of legends
MethodAutomaticwhat methods to use
PerformanceGoal$PerformanceGoalaspects of performance to try to optimize
ScalingFunctionsNonehow to scale individual coordinates
  • The arguments supplied to ChartElementFunction are the box region , the data vector , and metadata from each level in a nested list of datasets.
Generate a distribution chart of a list of datasets:
Multiple list of datasets:
Use categorical labels:
Categorical legends:
Style the shapes:
Use procedural shapes:
Histogram bars:
Generate a distribution chart of a list of datasets:
In[1]:=
Click for copyable input
Out[1]=
 
Multiple list of datasets:
In[1]:=
Click for copyable input
In[2]:=
Click for copyable input
Out[2]=
 
Use categorical labels:
In[1]:=
Click for copyable input
In[2]:=
Click for copyable input
Out[2]=
Categorical legends:
In[3]:=
Click for copyable input
Out[3]=
 
Style the shapes:
In[1]:=
Click for copyable input
In[2]:=
Click for copyable input
Out[2]=
Use procedural shapes:
In[3]:=
Click for copyable input
Out[3]=
Histogram bars:
In[4]:=
Click for copyable input
Out[4]=
Single data vector:
Multiple data vectors:
Data vectors in a dataset are grouped together:
Datasets do not need to have the same number of data vectors:
Non-real data is taken to be missing and typically yields a gap in the box-and-whisker chart:
Non-real entries in data vectors are omitted:
Use wrappers on individual data vector, datasets, or collections of datasets:
Inner wrappers take precedence over outer wrappers:
Override the default tooltips:
Use PopupWindow to provide additional drilldown information:
Use the other charting functions in a PopupWindow to provide more information:
Button can be used to trigger any action:
Use an explicit list of styles for the shapes:
Use any gradient or indexed color schemes from ColorData:
Use color schemes designed for charting:
ChartBaseStyle can be used to set an initial style for all chart elements:
Style can be used to override styles:
Use built-in programmatically generated shapes:
For detailed settings use PalettesChartElementSchemes:
Change the origin of shapes:
Adjust the spacing between individuals and groups of shapes:
Use Labeled to add a label to a shape:
Use symbolic positions for label placement:
Provide categorical labels for the columns of data:
For rows of data:
For both:
Use Placed to control the positioning of labels, using the same positions as for Labeled:
Provide value labels for shapes by using LabelingFunction:
Use Placed to control placement and formatting:
Add categorical legend entries for the columns of data:
For a row of data:
Use Legended to add additional legend entries:
Use Placed to affect the positioning of legends:
Change bar origin:
DistributionChart automatically selects the spacing between bars:
With groups of data:
Use symbolic spacing:
With groups of data:
Use explicit spacing between bars:
With groups of data:
Use no bar spacing:
Within groups of data:
Use ChartBaseStyle to style box and whiskers:
ChartBaseStyle combines with ChartStyle:
ChartStyle may override settings for ChartBaseStyle:
Get a list of built-in settings for ChartElementFunction:
For detailed settings use PalettesChartElementSchemes:
Shade the default violin bars according to density:
Use bands to mark decile boundaries:
Write a custom ChartElementFunction:
By default labels are placed under the frame:
Use Placed to control label placement:
Symbolic positions outside the bar:
Use group labels to label groups:
Coordinate-based placement relative to a bar:
Place all labels at the upper-right corner and vary the coordinates within the label:
Use the third argument to Placed to control formatting:
Place multiple labels:
ChartLayout is grouped by default:
Use overlapped layout:
Generate a legend based on chart style:
Use Placed to change the legend location:
Use ChartStyle to style the bars:
Give a list of styles:
Use "Gradient" colors from ColorData:
Use "Indexed" colors from ColorData:
Styles are used cyclically:
Style datasets in a group:
Style groups of datasets:
By default, bars have tooltips with a summary table of the data:
Define a labeling function and place it in the tooltip:
Use bar widths proportional to the square root of the data sizes:
Put bars on fixed positions with varying bar spacing:
Use constant width bars:
Generate a distribution chart with interactive highlighting:
Emphasize performance by disabling interactive behaviors:
Typically, less memory is required for non-interactive charts:
Compare the distribution of salaries for several departments at a university:
Use BoxWhiskerChart to show distribution of data:
BoxWhiskerChart is a special case of DistributionChart:
Use Histogram and SmoothHistogram to visualize lists of data vectors:
The default shapes used by DistributionChart are effectively generated using SmoothHistogram:
Use QuantilePlot and ProbabilityPlot to compare data to distributions:
Use Histogram3D and SmoothHistogram3D to visualize 2D data:
New in 8