Products
  • Wolfram|One

    The definitive Wolfram Language and notebook experience

  • Mathematica

    The original technical computing environment

  • System Modeler

    Multidomain modeling and simulation of complex systems

  • Compute ServicesUse with Mathematica and Wolfram|One
  • AI AccessUse with Mathematica and Wolfram|One
  • Finance Platform
  • Wolfram|Alpha Notebook Edition
  • Application Server
  • Enterprise Private Cloud
  • Wolfram Engine
  • Wolfram Player
  • Wolfram Cloud App
  • Wolfram Player App

More mobile apps

Wolfram|Alpha

  • Wolfram|Alpha Website
  • Wolfram|Alpha APIs

AI Products

  • Wolfram AI Ecosystem
  • Wolfram Foundation Tool
  • Wolfram Cloud MCP
  • Wolfram Local MCP
  • Agent One API
  • CAG Component APIs

Core Technologies of Wolfram Products

  • Wolfram Language
  • Computable Data
  • Wolfram Notebooks
  • Linguistic Understanding

Additional Deployment Options

  • Wolfram Cloud
  • Wolfram Web Engine
  • wolframscript
  • WSTPServer
  • Group & Organizational Licensing
  • All Products
Consulting & Solutions

We deliver solutions for the AI era—combining symbolic computation, data-driven insights and deep technical expertise

Wolfram Consulting

Data Science, Finance & Business

  • Artificial Intelligence
  • Data Science
  • Healthcare
  • Real Estate

Engineering

  • Civil Engineering
  • Automotive Engineering
  • Sustainable Energy

Science & Technology

  • AgTech
  • Biosciences
  • Environmental Science
  • Food Science
  • Quantum Computation
  • Social and Behavioral Sciences

More Wolfram Solutions

Technology for Education

  • Research Universities
  • Colleges & Teaching Universities
  • High Schools
  • Resources for Students

Education Initiatives

  • Next-Gen EdTech
  • Computer-Based Math

More Solutions for Education

  • Contact Us
Learning & Support

Get Started

  • Wolfram Language Introduction
  • Fast Intro for Programmers
  • Fast Intro for Math Students
  • Wolfram Language Documentation

More Learning

  • Highlighted Core Areas
  • Demonstrations
  • YouTube
  • Daily Study Groups
  • Wolfram Schools and Programs
  • Books

Grow Your Skills

  • Wolfram U

    Courses in computing, science, life and more

  • Community

    Learn, solve problems and share ideas.

  • Blog

    News, views and insights from Wolfram

  • Resources for

    Software Developers

Tech Support

  • Contact Us
  • Support FAQs
  • Support FAQs
  • Contact Us
Company
  • About Wolfram
  • Career Center
  • All Sites & Resources
  • Connect & Follow
  • Contact Us

Work with Us

  • Student Ambassador Initiative
  • Wolfram for Startups
  • Student Opportunities
  • Jobs Using Wolfram Language

Educational Programs for Adults

  • Summer School
  • Winter School

Educational Programs for Youth

  • Middle School Camp
  • High School Research Program
  • Computational Adventures

Read

  • Stephen Wolfram's Writings
  • Wolfram Blog
  • Wolfram Tech | Books
  • Wolfram Media
  • Complex Systems

Educational Resources

  • Wolfram MathWorld
  • Wolfram in STEM
  • Wolfram Challenges
  • Wolfram Problem Generator

Wolfram Initiatives

  • Wolfram Science
  • Wolfram Foundation
  • History of Mathematics Project

Events

  • Stephen Wolfram Livestreams
  • Online & In-Person Events
  • Contact Us
  • Connect & Follow
For AIs
  • Your Account
  • User Portal
  • Wolfram Cloud
  • Products
    • Wolfram|One
    • Mathematica
    • System Modeler
    • Compute ServicesUse with Mathematica and Wolfram|One
    • AI AccessUse with Mathematica and Wolfram|One
    • Finance Platform
    • Wolfram|Alpha Notebook Edition
    • Application Server
    • Enterprise Private Cloud
    • Wolfram Engine
    • Wolfram Player
    • Wolfram Cloud App
    • Wolfram Player App

    More mobile apps

    • Wolfram|Alpha
      • Wolfram|Alpha Website
      • Wolfram|Alpha APIs
    • AI Products
      • Wolfram AI Ecosystem
      • Wolfram Foundation Tool
      • Wolfram Cloud MCP
      • Wolfram Local MCP
      • Agent One API
      • CAG Component APIs
    • Core Technologies
      • Wolfram Language
      • Computable Data
      • Wolfram Notebooks
      • Linguistic Understanding
    • Additional Deployment Options
      • Wolfram Cloud
      • Wolfram Web Engine
      • wolframscript
      • WSTPServer
    • Group & Organizational Licensing
    • All Products
  • Consulting & Solutions
    • Wolfram Consulting

    Data Science, Finance & Business

    • Artificial Intelligence
    • Data Science
    • Healthcare
    • Real Estate

    Engineering

    • Civil Engineering
    • Automotive Engineering
    • Sustainable Energy

    Science & Technology

    • AgTech
    • Biosciences
    • Environmental Science
    • Food Science
    • Quantum Computation
    • Social and Behavioral Sciences

    More Wolfram Solutions

    Technology for Education

    • Research Universities
    • Colleges & Teaching Universities
    • High Schools
    • Resources for Students

    Education Initiatives

    • Next-Gen EdTech
    • Computer-Based Math

    More Solutions for Education

    • Contact Us
  • Learning & Support

    Get Started

    • Wolfram Language Introduction
    • Fast Intro for Programmers
    • Fast Intro for Math Students
    • Wolfram Language Documentation

    Grow Your Skills

    • Wolfram U

      Courses in computing, science, life and more

    • Community

      Learn, solve problems and share ideas.

    • Blog

      News, views and insights from Wolfram

    • Resources for

      Software Developers
    • Tech Support
      • Contact Us
      • Support FAQs
    • More Learning
      • Highlighted Core Areas
      • Demonstrations
      • YouTube
      • Daily Study Groups
      • Wolfram Schools and Programs
      • Books
    • Support FAQs
    • Contact Us
  • Company
    • About Wolfram
    • Career Center
    • All Sites & Resources
    • Connect & Follow
    • Contact Us

    Work with Us

    • Student Ambassador Initiative
    • Wolfram for Startups
    • Student Opportunities
    • Jobs Using Wolfram Language

    Educational Programs for Adults

    • Summer School
    • Winter School

    Educational Programs for Youth

    • Middle School Camp
    • High School Research Program
    • Computational Adventures

    Read

    • Stephen Wolfram's Writings
    • Wolfram Blog
    • Wolfram Tech | Books
    • Wolfram Media
    • Complex Systems
    • Educational Resources
      • Wolfram MathWorld
      • Wolfram in STEM
      • Wolfram Challenges
      • Wolfram Problem Generator
    • Wolfram Initiatives
      • Wolfram Science
      • Wolfram Foundation
      • History of Mathematics Project
    • Events
      • Stephen Wolfram Livestreams
      • Online & In-Person Events
    • Contact Us
    • Connect & Follow
  • For AIs
  • Wolfram Cloud
  • Your Account
  • User Portal
Wolfram Language & System Documentation Center
DistributionChart
  • See Also
    • BoxWhiskerChart
    • Histogram
    • QuantilePlot
    • BarChart
    • ListLinePlot
    • Quantile
  • Related Guides
    • Statistical Visualization
    • Time Series Processing
    • Date & Time Visualization
    • Random Variables
    • Event Series Processing
    • Tabular Visualization
    • See Also
      • BoxWhiskerChart
      • Histogram
      • QuantilePlot
      • BarChart
      • ListLinePlot
      • Quantile
    • Related Guides
      • Statistical Visualization
      • Time Series Processing
      • Date & Time Visualization
      • Random Variables
      • Event Series Processing
      • Tabular Visualization

DistributionChart[{data1,data2,…}]

makes a distribution chart with a distribution symbol for each datai.

DistributionChart[{data1,data2,…},elems]

makes a distribution chart using the appearance elements elems.

DistributionChart[{…,wi[datai,…],…,wj[dataj,…],…}]

makes a distribution chart with symbol features defined by the symbolic wrappers wk.

DistributionChart[{{data1,data2,…},…}]

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

Details and Options
Details and Options Details and Options
Examples  
Basic Examples  
Scope  
Data and Layouts  
Tabular Data  
Appearance Elements  
Styling and Appearance  
Labeling and Legending  
Options  
AspectRatio  
BarOrigin  
BarSpacing  
Show More Show More
ChartElementFunction  
ChartLayout  
LabelingFunction  
LabelingSize  
Method  
PerformanceGoal  
PlotInteractivity  
PlotTheme  
ScalingFunctions  
Applications  
Properties & Relations  
See Also
Related Guides
History
Cite this Page
BUILT-IN SYMBOL
  • See Also
    • BoxWhiskerChart
    • Histogram
    • QuantilePlot
    • BarChart
    • ListLinePlot
    • Quantile
  • Related Guides
    • Statistical Visualization
    • Time Series Processing
    • Date & Time Visualization
    • Random Variables
    • Event Series Processing
    • Tabular Visualization
    • See Also
      • BoxWhiskerChart
      • Histogram
      • QuantilePlot
      • BarChart
      • ListLinePlot
      • Quantile
    • Related Guides
      • Statistical Visualization
      • Time Series Processing
      • Date & Time Visualization
      • Random Variables
      • Event Series Processing
      • Tabular Visualization

DistributionChart

DistributionChart[{data1,data2,…}]

makes a distribution chart with a distribution symbol for each datai.

DistributionChart[{data1,data2,…},elems]

makes a distribution chart using the appearance elements elems.

DistributionChart[{…,wi[datai,…],…,wj[dataj,…],…}]

makes a distribution chart with symbol features defined by the symbolic wrappers wk.

DistributionChart[{{data1,data2,…},…}]

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

Details and Options

  • DistributionChart is also known as a violin plot.
  • DistributionChart draws a representation of the distribution of values in each datai.
  • Data elements for DistributionChart can be given in the following forms:
  • dataia pure dataset
    Quantity[datai,unit]data datai with units
    wi[datai,…]data veci with wrapper wi
    formi->midata with metadata mi
  • Each datai should be a list of real numbers {y1,y2,…}. Elements yj that are not real numbers are taken to be missing and are excluded. If datai is not a list of real numbers, it is taken to be missing data and will typically result in a gap in the distribution chart.
  • Datasets for DistributionChart can be given in the following forms:
  • {data1,data2,…}list of elements with or without wrappers
    <|k1data1,k2data2,…|>association of keys and datasets
    TimeSeries[…],EventSeries[…],TemporalData[…]time series, event series, and temporal data
    WeightedData[…],EventData[…]augmented datasets
    w[{data1,data2,…},…]wrapper applied to a grouped dataset
    w[{{data1,data1,…},…},…]wrapper applied to all grouped datasets
  • DistributionChart[Tabular[…]cspec] extracts and plots values from the tabular object using the column specification cspec.
  • The following forms of column specifications cspec are allowed for plotting tabular data:
  • colxplot a distribution chart for the values in column colx
    {colx1,colx2,…}plot distribution charts for columns colx1, colx2, …
  • The following wrappers can be used for the datai:
  • Annotation[e,label]provide an annotation
    Button[e,action]define an action to execute when the element is clicked
    Callout[e,label]display the element with a callout
    EventHandler[e,…]define a general event handler for the element
    Hyperlink[e,uri]make the element act as a hyperlink
    Labeled[e,…]display the element with labeling
    Legended[e,…]include features of the element in a chart legend
    Mouseover[e,over]make the element show a mouseover form
    PopupWindow[e,cont]attach a popup window to the element
    StatusArea[e,label]display in the status area when the element is moused over
    Style[e,opts]show the element using the specified styles
    Tooltip[e,label]attach an arbitrary tooltip to the element
  • Possible appearance elements elems can be of the form:
  • Automaticautomatic distribution appearance
    "name"named distribution appearance "name"
    {"name",<|"prop1"val1,…|>}named appearance with property propi set to value vali
  • Possible named elements "name" include:
  • Commonly used properties for appearance elements include:
  • "Alignment"Centerhow to align element contents
    "BoundaryStyle"Automaticstyle to use for the boundary of elements
    "FarOutlier"Nonestyle to use for far outliers
    "FillingStyle"Automaticfilling style for the elements
    "LineStyle"Nonestyle to use for line elements
    "LineWidth"Automatichow long to draw line elements
    "Outlier"Nonestyle to use for outliers
    "PointStyle"Nonestyle to use for point elements
    "PointWidth"Automatichow wide to place point elements
    "Quantiles"Nonewhere to draw quantile lines
    "QuantileShading"Nonehow to shade quantile regions
    "QuantileStyle"Automaticstyle to use for quantile lines
    "Range"Automaticrange of values to show with element
  • Possible settings for "Alignment" include Left, Right, Before, After, Bottom, Top, Below, Above and Center.
  • The properties "Outlier" and "FarOutlier" take the following settings:
  • Automaticinclude outliers without showing
    Noneexclude outliers
    Trueshow outliers
    styleshow outliers in style style
    {marker,style}show outliers with marker marker and style style
  • "LineWidth" and "PointWidth" control how wide of a region lines and points can be drawn in. Possible settings include:
  • Automaticlimit the lines and points to be inside the element boundary
    Alluse the full width of the bounding box
    Scaled[s]use fraction s of the element boundary width
    suse fraction s of the bounding box width
  • The "Quantiles" property can take the following settings:
  • Nonedo not show any quantile lines
    Automaticshow quartile lines
    nshow n quantile regions
    {q1,q2,…}show quantiles q1,q2,…
  • The following "QuantileShading" settings can be used:
  • Nonedo not shade quantile regions
    Automaticautomatically shade the quantile regions
  • The property "Range" takes the following settings:
  • Allshow the full range of elements
    Automaticautomatically determine the range of data to show with element
    {min,max}show data and element between min and max
    {Scaled[min],Scaled[max]}show data and element between min and max quantiles
  • Possible properties for the "SmoothHistogram", "Violin" and "Density" elements include:
  • "Kernel"Automaticsmooth density kernel function
    "Bandwidth"Automaticsmooth density bandwidth
  • The settings for "Kernel" and "Bandwidth" take the same settings as in SmoothKernelDistribution.
  • Possible properties for the "Histogram" element include:
  • "Bins"Automatichistogram bins
    "Height""PDF"histogram height function
  • The settings for "Bins" and "Height" take the same settings as in Histogram.
  • DistributionChart has the same options as Graphics, with the following additions and changes: [List of all options]
  • AspectRatio 1/GoldenRatiooverall ratio of height to width
    BarOrigin Bottomorigin placement for shapes
    BarSpacing Automaticfractional spacing between shapes
    ChartBaseStyleAutomaticoverall style for shapes
    ChartElementFunction Automatichow to generate raw graphics for shapes
    ChartLabelsNonelabels for data elements and datasets
    ChartLayout Automaticoverall layout to use
    ChartLegendsNonelegends for data elements and datasets
    ChartStyleAutomaticstyle for shapes
    FrameTruewhether to draw a frame around the chart
    LabelingFunction Automatichow to label shapes
    LabelingSize Automaticmaximum size of callouts and labels
    LegendAppearanceAutomaticoverall appearance of legends
    Method Automaticwhat methods to use
    PerformanceGoal $PerformanceGoalaspects of performance to try to optimize
    PlotInteractivity $PlotInteractivitywhether to allow interactive elements
    PlotTheme $PlotThemeoverall theme for the chart
    ScalingFunctions Nonehow to scale individual coordinates
    TargetUnitsAutomaticunits to display in the chart
  • The following settings for ChartLayout can be used to display multiple sets of data:
  • "Grouped"separate the data for each dataset
    "Overlapped"overlap the data for each dataset
  • The arguments supplied to ChartElementFunction are the box region {{xmin,xmax},{ymin,ymax}}, the data vector veci, and metadata {m1,m2,…} from each level in a nested list of datasets.
  • A list of built-in settings for ChartElementFunction can be obtained from ChartElementData["DistributionChart"].
  • With ScalingFunctions->s, the data coordinate is scaled using s.
  • Style and other specifications from options and other constructs in DistributionChart are effectively applied in the order ChartStyle, Style and other wrappers, and ChartElementFunction, with later specifications overriding earlier ones.
  • List of all options

    • AlignmentPointCenterthe default point in the graphic to align with
      AspectRatio1/GoldenRatiooverall ratio of height to width
      AxesFalsewhether to draw axes
      AxesLabelNoneaxes labels
      AxesOriginAutomaticwhere axes should cross
      AxesStyle{}style specifications for the axes
      BackgroundNonebackground color for the plot
      BarOriginBottomorigin placement for shapes
      BarSpacingAutomaticfractional spacing between shapes
      BaselinePositionAutomatichow to align with a surrounding text baseline
      BaseStyle{}base style specifications for the graphic
      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
      ContentSelectableAutomaticwhether to allow contents to be selected
      CoordinatesToolOptionsAutomaticdetailed behavior of the coordinates tool
      Epilog{}primitives rendered after the main plot
      FormatTypeTraditionalFormthe default format type for text
      FrameTruewhether to draw a frame around the chart
      FrameLabelNoneframe labels
      FrameStyle{}style specifications for the frame
      FrameTicksAutomaticframe ticks
      FrameTicksStyle{}style specifications for frame ticks
      GridLinesNonegrid lines to draw
      GridLinesStyle{}style specifications for grid lines
      ImageMargins0.the margins to leave around the graphic
      ImagePaddingAllwhat extra padding to allow for labels etc.
      ImageSizeAutomaticthe absolute size at which to render the graphic
      LabelingFunctionAutomatichow to label shapes
      LabelingSizeAutomaticmaximum size of callouts and labels
      LabelStyle{}style specifications for labels
      LegendAppearanceAutomaticoverall appearance of legends
      MethodAutomaticwhat methods to use
      PerformanceGoal$PerformanceGoalaspects of performance to try to optimize
      PlotInteractivity$PlotInteractivitywhether to allow interactive elements
      PlotLabelNonean overall label for the plot
      PlotRangeAllrange of values to include
      PlotRangeClippingFalsewhether to clip at the plot range
      PlotRangePaddingAutomatichow much to pad the range of values
      PlotRegionAutomaticthe final display region to be filled
      PlotTheme$PlotThemeoverall theme for the chart
      PreserveImageOptionsAutomaticwhether to preserve image options when displaying new versions of the same graphic
      Prolog{}primitives rendered before the main plot
      RotateLabelTruewhether to rotate y labels on the frame
      ScalingFunctionsNonehow to scale individual coordinates
      TargetUnitsAutomaticunits to display in the chart
      TicksAutomaticaxes ticks
      TicksStyle{}style specifications for axes ticks

Examples

open all close all

Basic Examples  (4)

Generate a distribution chart of a list of datasets:

Wolfram Language code: DistributionChart[RandomReal[BetaDistribution[2, 1 / 4], {6, 100}]]

Multiple list of datasets:

Wolfram Language code: data = Table[RandomVariate[BetaDistribution[2, RandomReal[]], 100], {4}, {2}];
Wolfram Language code: DistributionChart[data]

Use categorical labels:

Wolfram Language code: data = Table[RandomVariate[NormalDistribution[RandomInteger[5], 1], 100], {2}, {3}];
Wolfram Language code: DistributionChart[data, PlotLabels -> <|"Elements" -> {"a", "b", "c"}|>]

Categorical legends:

Wolfram Language code: DistributionChart[data, PlotLegends -> <|"Elements" -> {"a", "b", "c"}|>]

Style the shapes:

Wolfram Language code: data = Table[RandomVariate[NormalDistribution[RandomInteger[5], 1], 100], {2}, {3}];
Wolfram Language code: DistributionChart[data]

Use symmetrical smooth histogram or violin shape:

Wolfram Language code: DistributionChart[data, "Violin"]

Use histogram:

Wolfram Language code: DistributionChart[data, "Histogram"]

Scope  (43)

Data and Layouts  (17)

Single data list:

Wolfram Language code: DistributionChart[RandomReal[NormalDistribution[], {1, 100}]]

Multiple data lists:

Wolfram Language code: DistributionChart[RandomReal[NormalDistribution[], {3, 100}]]

Data lists in a dataset are grouped together:

Wolfram Language code: data = RandomVariate[NormalDistribution[0, 1], 100];
Wolfram Language code: DistributionChart[{{data, data + 1, data + 2}, {data, data + 1, data + 2}}]

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

Wolfram Language code: data = RandomVariate[NormalDistribution[0, 1], 100];
Wolfram Language code: DistributionChart[{{data, data + 1}, {data, data + 1, data + 2, data + 3}}]

Nonreal data is taken to be missing and typically yields a gap:

Wolfram Language code: data = RandomVariate[NormalDistribution[0, 1], 100];
Wolfram Language code: DistributionChart[{data, Missing[], data, foo, data}, BarSpacing -> 3]

Nonreal entries in data lists are omitted:

Wolfram Language code: DistributionChart[{I, 1, 2, Missing[], 3, 4, foo, 5}]

The data may include units:

Wolfram Language code: DistributionChart[{Quantity[33, "Meters"], Quantity[35, "Meters"], Quantity[12, "Meters"], Quantity[8, "Meters"], Quantity[50, "Meters"], Quantity[15, "Meters"], Quantity[24, "Meters"], Quantity[44, "Meters"], Quantity[4, "Meters"], Quantity[37, "Meters"]}, FrameLabel -> Automatic]

Specify the units to use:

Wolfram Language code: DistributionChart[{Quantity[33, "Meters"], Quantity[35, "Meters"], Quantity[12, "Meters"], Quantity[8, "Meters"], Quantity[50, "Meters"], Quantity[15, "Meters"], Quantity[24, "Meters"], Quantity[44, "Meters"], Quantity[4, "Meters"], Quantity[37, "Meters"]}, FrameLabel -> Automatic, TargetUnits -> "Feet"]

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

Wolfram Language code: d = RandomVariate[NormalDistribution[], 100];
Wolfram Language code: DistributionChart[TimeSeries[d, {"May 24, 1982"}]]

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

Wolfram Language code: d1 = RandomVariate[NormalDistribution[0, 1], 100]; d2 = RandomVariate[NormalDistribution[2, 0.5], 100];
Wolfram Language code: DistributionChart[<|"a" -> d1, "b" -> d2, "c" -> d1 + d2|>]

Use the keys as labels:

Wolfram Language code: DistributionChart[<|"a" -> d1, "b" -> d2, "c" -> d1 + d2|>, PlotLabels -> Automatic]

Use the keys as legends:

Wolfram Language code: DistributionChart[<|"a" -> d1, "b" -> d2, "c" -> d1 + d2|>, PlotLegends -> Automatic, PlotStyle -> {Hue[0.6, 0.7, 0.8], Hue[0.22, 1, 0.7], Hue[0.75, 0.6, 0.7]}]

Associations can be nested:

Wolfram Language code: a1 = RandomVariate[NormalDistribution[0, 2], 100]; a2 = RandomVariate[NormalDistribution[2, 1 / 2], 100]; b1 = RandomVariate[ChiDistribution[1], 100]; b2 = RandomVariate[ChiDistribution[3], 100];
Wolfram Language code: DistributionChart[<|"group a" -> <|"a" -> a1, "b" -> a2, "c" -> a1 + a2|>, "group b" -> <|"a" -> b1, "b" -> b2, "c" -> b1 + b2|>|>, PlotLegends -> Automatic, PlotLabels -> {Automatic, None}]

Use WeightedData to add weights to data:

Wolfram Language code: data = RandomReal[{-1, 1}, 100];
Wolfram Language code: wd = WeightedData[data, data ^ 2]
Wolfram Language code: DistributionChart[{data, wd}, PlotLabels -> {"data", "weighted data"}]

Use EventData to add censoring and truncation information:

Wolfram Language code: event = EventData[data, Round[data]]
Wolfram Language code: DistributionChart[{data, event}, PlotLabels -> {"data", "censored data"}]

Use wrappers on individual data list, datasets or collections of datasets:

Wolfram Language code: d = RandomVariate[NormalDistribution[0, 1], 100];
Wolfram Language code: {DistributionChart[{{d, Style[d + 1, RGBColor[0.93, 0.27, 0.27]], d + 2}, {d, d + 1, d + 2}}], DistributionChart[{Style[{d, d + 1, d + 2}, RGBColor[0.14, 0.8, 0.14]], {d, d + 1, d + 2}}], DistributionChart[Style[{{d, d + 1, d + 2}, {d, d + 1, d + 2}}, RGBColor[0.4, 0.6, 1]]]}

Inner wrappers take precedence over outer wrappers:

Wolfram Language code: d = RandomVariate[NormalDistribution[0, 1], 100];
Wolfram Language code: {DistributionChart[{{d, Style[d + 1, RGBColor[0.93, 0.27, 0.27]], d + 2}, {d, d + 1, d + 2}}], DistributionChart[{Style[{d, Style[d + 1, RGBColor[0.93, 0.27, 0.27]], d + 2}, RGBColor[0.14, 0.8, 0.14]], {d, d + 1, d + 2}}], DistributionChart[Style[{Style[{d, Style[d + 1, RGBColor[0.93, 0.27, 0.27]], d + 2}, RGBColor[0.14, 0.8, 0.14]], {d, d + 1, d + 2}}, RGBColor[0.4, 0.6, 1]]]}

Override the default tooltips:

Wolfram Language code: d = RandomVariate[NormalDistribution[0, 1], 100];
Wolfram Language code: DistributionChart[{d, Tooltip[d + 1, "μ = 1"], d + 2}]

Use PopupWindow to provide additional drilldown information:

Wolfram Language code: d = RandomVariate[NormalDistribution[0, 1], 100];
Wolfram Language code: DistributionChart[{d, PopupWindow[d + 1, BoxWhiskerChart[d + 1]], d + 2}]

Use the other charting functions in a PopupWindow to provide more information:

Wolfram Language code: DistributionChart[Table[PopupWindow[FinancialData[f, {{2010, 1}, {2010, 6}}], TradingChart[{f, {{2010, 1}, {2010, 6}}}, PlotLabel -> f]], {f, {"MSFT", "ORCL", "ADBE"}}]]

Button can be used to trigger any action:

Wolfram Language code: d = RandomVariate[NormalDistribution[0, 1], 100];
Wolfram Language code: DistributionChart[{d, Button[d + 1, Speak["Mean is 1."]], d + 2}]

Tabular Data  (2)

Get tabular data:

Wolfram Language code: penguins = ResourceData["Sample Tabular Data: Palmer Penguins"]

Generate a distribution chart for flipper lengths:

Wolfram Language code: DistributionChart[penguins -> "flipper_length"]

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

Wolfram Language code: pivot = PivotToColumns[penguins, "species" -> "flipper_length"]

Compare flipper lengths by species:

Wolfram Language code: DistributionChart[pivot -> {ExtendedKey["flipper_length", "Adelie"], ExtendedKey["flipper_length", "Chinstrap"], ExtendedKey["flipper_length", "Gentoo"]}, PlotLabels -> {"Adelie", "Chinstrap", "Gentoo"}]

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

Wolfram Language code: DistributionChart[pivot -> {"Adelie", "Chinstrap", "Gentoo"}, PlotLabels -> {"Adelie", "Chinstrap", "Gentoo"}]

Appearance Elements  (9)

Use smooth histograms to show the distributions of values in the data:

Wolfram Language code: DistributionChart[IconizedObject[«data»], "SmoothHistogram"]

Use symmetrical smooth histograms or violins to show the distributions of values in the data:

Wolfram Language code: DistributionChart[IconizedObject[«data»], "Violin"]

Specify a narrower bandwidth for the smooth histogram:

Wolfram Language code: DistributionChart[IconizedObject[«data»], {"SmoothHistogram", <|"Bandwidth" -> 0.1|>}]

Use a triangular kernel function for smoothing:

Wolfram Language code: DistributionChart[IconizedObject[«data»], {"Violin", <|"Kernel" -> "Triangular"|>}]

Use a bounded kernel function to remove artificial range:

Wolfram Language code: DistributionChart[IconizedObject[«data»], {"Violin", <|"Kernel" -> {"Bounded", 0, "Gaussian"}|>}]

Use binned histograms to show the distributions:

Wolfram Language code: DistributionChart[IconizedObject[«data»], "Histogram"]

Use approximately 5 bins with "nice" boundary values:

Wolfram Language code: DistributionChart[IconizedObject[«data»], {"Histogram", <|"Bins" -> 5|>}]

Use bins with width 0.5:

Wolfram Language code: DistributionChart[IconizedObject[«data»], {"Histogram", <|"Bins" -> {0.5}|>}]

Use density to show the distributions of values in the data:

Wolfram Language code: DistributionChart[IconizedObject[«data»], "Density"]

Specify a narrower bandwidth for the smooth histogram:

Wolfram Language code: DistributionChart[IconizedObject[«data»], {"Density", <|"Bandwidth" -> 0.1|>}]

Use a triangular kernel function for smoothing:

Wolfram Language code: DistributionChart[IconizedObject[«data»], {"Density", <|"Kernel" -> "Triangular"|>}]

Add lines to show the where the values are in the data:

Wolfram Language code: Table[DistributionChart[IconizedObject[«data»], {appearance, <|"LineWidth" -> Automatic|>}, PlotLabel -> appearance], {appearance, {"SmoothHistogram", "Violin", "Density", "Box"}}]

Change the data line width:

Wolfram Language code: Table[DistributionChart[IconizedObject[«data»], {"SmoothHistogram", <|"LineWidth" -> Scaled[width]|>}, PlotLabel -> width], {width, {0, 0.2, 0.5, 1}}]

Change the data line color and thickness:

Wolfram Language code: DistributionChart[IconizedObject[«data»], {"SmoothHistogram", <|"LineWidth" -> Scaled[1], "LineStyle" -> Directive[RGBColor[0.98, 0.56, 0.17], AbsoluteThickness[1]]|>}]

Add points to show the where the values are in the data:

Wolfram Language code: Table[DistributionChart[IconizedObject[«data»], {appearance, <|"PointWidth" -> Automatic|>}, PlotLabel -> appearance], {appearance, {"Violin", "SmoothHistogram", "Histogram", "SymmetricalHistogram", "Density", "Box"}}]

Change the width of points located in the glyph:

Wolfram Language code: Table[DistributionChart[IconizedObject[«data»], {"Violin", <|"PointWidth" -> Scaled[width]|>}, PlotLabel -> Scaled[width]], {width, {0, 0.2, 0.5, 1}}]

Change the width of points located in the bounding box:

Wolfram Language code: Table[DistributionChart[IconizedObject[«data»], {"Violin", <|"PointWidth" -> width|>}, PlotLabel -> width], {width, {0, 0.2, 0.5, 1}}]

Change the point size:

Wolfram Language code: DistributionChart[IconizedObject[«data»], {"Violin", <|"PointWidth" -> Scaled[1], "PointStyle" -> Directive[Opacity[0.75], RGBColor[0.98, 0.56, 0.17], AbsolutePointSize[5]]|>}]

Add quantile lines to the glyphs:

Wolfram Language code: Table[DistributionChart[IconizedObject[«data»], {appearance, <|"Quantiles" -> Automatic|>}, PlotLabel -> appearance], {appearance, {"SmoothHistogram", "Violin", "Density", "Box"}}]

Specify how many quantiles to add:

Wolfram Language code: DistributionChart[IconizedObject[«data»], {"SmoothHistogram", <|"Quantiles" -> 10|>}]

Specify which quantiles to add:

Wolfram Language code: DistributionChart[IconizedObject[«data»], {"SmoothHistogram", <|"Quantiles" -> {0.1, 0.5, 0.9}|>}]

Change the quantile style:

Wolfram Language code: DistributionChart[IconizedObject[«data»], {"SmoothHistogram", <|"Quantiles" -> 5, "QuantileStyle" -> RGBColor[0.8, 0.3, 0.8]|>}]

Use quantile shading to differentiate quantile regions:

Wolfram Language code: DistributionChart[IconizedObject[«data»], {"SmoothHistogram", <|"Quantiles" -> 5, "QuantileShading" -> True|>}]

Change the displaying range of the glyph in percentage:

Wolfram Language code: DistributionChart[IconizedObject[«data»], {"SmoothHistogram", <|"Range" -> {Scaled[0.25], Scaled[0.75]}|>}]

Limit the displaying range of the glyph in absolute values:

Wolfram Language code: DistributionChart[IconizedObject[«data»], {"SmoothHistogram", <|"Range" -> {-1, 9}|>}]

Change alignment:

Wolfram Language code: Table[DistributionChart[IconizedObject[«data»], {"SmoothHistogram", <|"Alignment" -> alignment|>}, PlotLabel -> alignment, ImageSize -> 225], {alignment, {Before, After, Left, Right}}]

Styling and Appearance  (7)

Use an explicit list of styles for the shapes:

Wolfram Language code: data = Table[RandomVariate[NormalDistribution[μ, 1], 100], {μ, 0, 4, 1}];
Wolfram Language code: DistributionChart[data, PlotStyle -> {RGBColor[0.4, 0.6, 1], RGBColor[0.93, 0.27, 0.27], RGBColor[0.14, 0.8, 0.14], RGBColor[1, 0.75, 0], RGBColor[0.67, 0.54, 0.42]}]

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

Wolfram Language code: data = Table[RandomVariate[NormalDistribution[μ, 1], 100], {μ, 0, 5, 1}];
Wolfram Language code: DistributionChart[data, PlotStyle -> EdgeForm[Dashed]]

Style can be used to override styles:

Wolfram Language code: d[μ_] := RandomVariate[NormalDistribution[μ, 1], 100];
Wolfram Language code: DistributionChart[{d[1], d[2], Style[d[3], RGBColor[0.93, 0.27, 0.27]], d[4], d[5]}, PlotStyle -> {RGBColor[0.797253, 0.904982, 0.410498], RGBColor[0.934691, 0.945708, 0.75346], RGBColor[0.769879, 0.92369, 0.977371], RGBColor[1, 0.566415, 0.0386511], RGBColor[1, 1, 0.4]}]

Use built-in programmatically generated shapes:

Wolfram Language code: ChartElementData["DistributionChart"]
Wolfram Language code: data = Table[RandomVariate[NormalDistribution[μ, 1], 100], {μ, 0, 5, 1}];
Wolfram Language code: Table[DistributionChart[data, PlotStyle -> {RGBColor[0.8352941176470589, 0.5764705882352941, 0.5607843137254902], RGBColor[0.9490196078431372, 0.29411764705882354, 0.050980392156862744], RGBColor[1., 0.7333333333333333, 0.2], RGBColor[0.996078431372549, 0.9490196078431372, 0.44313725490196076], RGBColor[0.7058823529411765, 0.6862745098039216, 0.30196078431372547], RGBColor[0.41568627450980394, 0.5450980392156862, 0.12156862745098039]}, ChartElementFunction -> cf], {cf, {"Density", "HistogramDensity"}}]

For detailed settings, use Palettes ▶ ChartElementSchemes:

Wolfram Language code: DistributionChart[data, PlotStyle -> {RGBColor[0.8352941176470589, 0.5764705882352941, 0.5607843137254902], RGBColor[0.9490196078431372, 0.29411764705882354, 0.050980392156862744], RGBColor[1., 0.7333333333333333, 0.2], RGBColor[0.996078431372549, 0.9490196078431372, 0.44313725490196076], RGBColor[0.7058823529411765, 0.6862745098039216, 0.30196078431372547], RGBColor[0.41568627450980394, 0.5450980392156862, 0.12156862745098039]}, ChartElementFunction -> ChartElementData["GlassQuantile", "Quantile" -> 9, "QuantileShading" -> True]]

Change the origin of shapes:

Wolfram Language code: data = Table[RandomVariate[BetaDistribution[μ, 1 / 4], 100], {μ, 1, 4, 1}];
Wolfram Language code: Table[DistributionChart[data, PlotLabel -> o, BarOrigin -> o], {o, {Bottom, Top, Left, Right}}]

Adjust the spacing between individuals and groups of shapes:

Wolfram Language code: data = Table[RandomVariate[NormalDistribution[μ, 1], 100], {μ, {0, 1, 2}}];
Wolfram Language code: Table[DistributionChart[{data, data}, BarSpacing -> sp, PlotLabel -> sp, PlotStyle -> Opacity[0.8]], {sp, {Automatic, {0, 1}, {-0.3, 1}}}]

Use a theme with dark background and high-contrast styles:

Wolfram Language code: data = RandomVariate[NormalDistribution[RandomInteger[5], 1], {3, 3, 100}];
Wolfram Language code: DistributionChart[data, PlotTheme -> "Marketing"]

Use a theme with bright colors and grid lines:

Wolfram Language code: DistributionChart[data, PlotTheme -> "Business"]

Labeling and Legending  (8)

Use Labeled to add a label to a shape:

Wolfram Language code: d[μ_] := RandomVariate[NormalDistribution[μ, 1], 100];
Wolfram Language code: DistributionChart[{d[1], Labeled[d[2], "label"], d[3]}]

Use symbolic positions for label placement:

Wolfram Language code: d[μ_] := RandomVariate[BetaDistribution[μ, 0.5], 100];
Wolfram Language code: Table[DistributionChart[{Labeled[d[1], "label", p], d[2], d[3]}, PlotLabel -> p, Frame -> False], {p, {Bottom, Center, Top}}]
Wolfram Language code: Table[DistributionChart[{Labeled[d[1], "label", p], d[2], d[3]}, PlotLabel -> p, Frame -> False], {p, {Before, After, Above, Below}}]

Provide categorical labels for data elements:

Wolfram Language code: data = Table[RandomVariate[NormalDistribution[μ, 1], 100], {μ, {0, 2}}, {3}];
Wolfram Language code: DistributionChart[data, PlotLabels -> <|"Elements" -> {"c1", "c2", "c3"}|>]

For the data groups:

Wolfram Language code: DistributionChart[data, PlotLabels -> <|"Groups" -> {"r1", "r2"}|>]

For both:

Wolfram Language code: DistributionChart[data, PlotLabels -> <|"Groups" -> {"r1", "r2"}, "Elements" -> {"c1", "c2", "c3"}|>]

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

Wolfram Language code: data = Table[RandomVariate[NormalDistribution[μ, 1], 100], {μ, {0, 2}}, {3}];
Wolfram Language code: DistributionChart[data, PlotLabels -> <|"Groups" -> Placed[{"r1", "r2"}, Above], "Elements" -> Placed[{"c1", "c2", "c3"}, Center]|>]

Provide value labels for shapes by using LabelingFunction:

Wolfram Language code: data = Table[RandomVariate[NormalDistribution[μ, 1], 100], {μ, {0, 2}}, {3}];
Wolfram Language code: DistributionChart[data, LabelingFunction -> (Placed[Mean[#], Tooltip]&)]

Use Placed to control placement and formatting:

Wolfram Language code: labeler[v_, {i_, j_}, {ri_, cj_}] := Placed[Row[{ri[[1]], cj[[1]]}, ","], Center, Rotate[#, Pi / 4]&]
Wolfram Language code: DistributionChart[data, PlotLabels -> <|"Groups" -> {"r1", "r2"}, "Elements" -> {"c1", "c2", "c3"}|>, LabelingFunction -> labeler]

Add categorical legend entries for data elements:

Wolfram Language code: data = Table[RandomVariate[NormalDistribution[μ, 1], 100], {μ, {0, 2}}, {3}];
Wolfram Language code: DistributionChart[data, PlotLegends -> <|"Elements" -> {"ccc1", "ccc2", "ccc3"}|>, PlotStyle -> <|"Elements" -> {RGBColor[0.761959, 0.470832, 0.940597], RGBColor[0.9584254999999999, 0.877884, 0.5906629999999999], RGBColor[0.431296, 0.709773, 0.927077]}|>]

For the data groups:

Wolfram Language code: DistributionChart[data, PlotLegends -> <|"Groups" -> {"rr1", "rr2"}|>, PlotStyle -> <|"Groups" -> {RGBColor[0.761959, 0.470832, 0.940597], RGBColor[0.431296, 0.709773, 0.927077]}|>]

Use Legended to add additional legend entries:

Wolfram Language code: d[μ_] := RandomVariate[NormalDistribution[μ, 1], 100];
Wolfram Language code: DistributionChart[{d[1], Legended[d[2], "extra"], d[3]}, PlotLegends -> <|"Elements" -> {"ccc1", "ccc2", "ccc3"}|>, PlotStyle -> {RGBColor[0.761959, 0.470832, 0.940597], RGBColor[0.9584254999999999, 0.877884, 0.5906629999999999], RGBColor[0.431296, 0.709773, 0.927077]}]
Wolfram Language code: DistributionChart[Legended[{d[1], d[2], d[3]}, "extra"], PlotLegends -> {"ccc1", "ccc2", "ccc3"}, PlotStyle -> {RGBColor[0.761959, 0.470832, 0.940597], RGBColor[0.9584254999999999, 0.877884, 0.5906629999999999], RGBColor[0.431296, 0.709773, 0.927077]}]

Use Placed to affect the positioning of legends:

Wolfram Language code: data = Table[RandomVariate[NormalDistribution[μ, 1], 100], {μ, {0, 2}}, {3}];
Wolfram Language code: Table[DistributionChart[data, PlotLegends -> <|"Elements" -> Placed[{"ccc1", "ccc2", "ccc3"}, p]|>, PlotStyle -> <|"Elements" -> {RGBColor[0.761959, 0.470832, 0.940597], RGBColor[0.9584254999999999, 0.877884, 0.5906629999999999], RGBColor[0.431296, 0.709773, 0.927077]}|>, ImageSize -> 225], {p, {Below, Above}}]

Options  (32)

AspectRatio  (3)

By default, DistributionChart uses a fixed height to width ratio for the plot:

Wolfram Language code: DistributionChart[IconizedObject[«data»]]

Make the height the same as the width with AspectRatio1:

Wolfram Language code: DistributionChart[IconizedObject[«data»], AspectRatio -> 1]

AspectRatioFull adjusts the height and width to tightly fit inside other constructs:

Wolfram Language code: plot = DistributionChart[IconizedObject[«data»], AspectRatio -> Full]; {Framed[Pane[plot, {100, 150}]], Framed[Pane[plot, {100, 100}]], Framed[Pane[plot, {150, 100}]]}

BarOrigin  (1)

Change bar origin:

Wolfram Language code: data = RandomVariate[NormalDistribution[2, 1], {6, 100}];
Wolfram Language code: DistributionChart[data]
Wolfram Language code: Table[DistributionChart[data, BarOrigin -> o, PlotLabel -> o], {o, {Bottom, Top, Left, Right}}]

BarSpacing  (4)

DistributionChart automatically selects the spacing between bars:

Wolfram Language code: Table[DistributionChart[RandomVariate[NormalDistribution[], {n, 100}]], {n, {1, 2, 4, 8}}]

With groups of data:

Wolfram Language code: Table[DistributionChart[RandomVariate[NormalDistribution[], {n, 2, 100}]], {n, {2, 4}}]

Use symbolic spacing:

Wolfram Language code: Table[DistributionChart[RandomVariate[NormalDistribution[], {5, 100}], BarSpacing -> s, PlotLabel -> s], {s, {Tiny, Small, Medium, Large}}]

With groups of data:

Wolfram Language code: Table[DistributionChart[RandomVariate[NormalDistribution[], {3, 2, 100}], BarSpacing -> s, PlotLabel -> s], {s, {Tiny, Small, Medium, Large}}]

Use explicit spacing between shapes:

Wolfram Language code: Table[DistributionChart[RandomVariate[NormalDistribution[], {5, 100}], BarSpacing -> s, PlotLabel -> s], {s, {0.25, 0.5, 1, 2}}]

With groups of data:

Wolfram Language code: Table[DistributionChart[RandomVariate[NormalDistribution[], {4, 2, 100}], BarSpacing -> s, PlotLabel -> s], {s, {{0.25, 0.5}, {0, 1}}}]

Use no bar spacing:

Wolfram Language code: DistributionChart[RandomVariate[NormalDistribution[], {5, 100}], BarSpacing -> None]

Within groups of data:

Wolfram Language code: DistributionChart[RandomVariate[NormalDistribution[], {3, 2, 100}], BarSpacing -> {None, 1}]

ChartElementFunction  (5)

Get a list of built-in settings for ChartElementFunction:

Wolfram Language code: ChartElementData["DistributionChart"]

For detailed settings, use Palettes ▶ ChartElementSchemes:

Wolfram Language code: data = RandomReal[NormalDistribution[], {5, 100}];
Wolfram Language code: Table[DistributionChart[data, ChartElementFunction -> f], {f, {"Quantile", "DensityQuantile", "FadingQuantile", "GlassQuantile"}}]
Wolfram Language code: Table[DistributionChart[data, ChartElementFunction -> f], {f, {"Density", "HistogramDensity", "LineDensity", "PointDensity"}}]

Shade the default violin bars according to density:

Wolfram Language code: DistributionChart[RandomVariate[NormalDistribution[0, 1], {8, 100}], ChartElementFunction -> ChartElementData["SmoothDensity", "ColorScheme" -> "DeepSeaColors"]]

Use bands to mark decile boundaries:

Wolfram Language code: Table[DistributionChart[RandomVariate[NormalDistribution[], {5, 100}], ChartElementFunction -> ChartElementData[f, "QuantileShading" -> True, "Quantile" -> 10]], {f, {"Quantile", "DensityQuantile", "FadingQuantile", "GlassQuantile"}}]

Write a custom ChartElementFunction:

Wolfram Language code: quantileBead[{{xmin_, xmax_}, {ymin_, ymax_}}, data_, metadata_] := Module[{min, max, lq, uq, median}, {min, lq, median, uq, max} = Quantile[data, {0, 0.1, 0.5, 0.9, 1}]; {Line[{{(xmin + xmax) / 2, min}, {(xmin + xmax) / 2, max}}], Polygon[{{xmin, median}, {(xmin + xmax) / 2, uq}, {xmax, median}, {(xmin + xmax) / 2, lq}}]} ]
Wolfram Language code: DistributionChart[RandomReal[NormalDistribution[0, 1], {3, 100}], PlotStyle -> {RGBColor[0.8352941176470589, 0.5764705882352941, 0.5607843137254902], RGBColor[0.9490196078431372, 0.29411764705882354, 0.050980392156862744], RGBColor[1., 0.7333333333333333, 0.2]}, ChartElementFunction -> quantileBead]

ChartLayout  (2)

ChartLayout is grouped by default:

Wolfram Language code: data = RandomVariate[NormalDistribution[0, 1], {2, 3, 100}];
Wolfram Language code: DistributionChart[data]

Use overlapped layout:

Wolfram Language code: DistributionChart[RandomVariate[NormalDistribution[0, 1], {4, 2, 100}], ChartLayout -> "Overlapped", ChartBaseStyle -> Opacity[0.3]]

LabelingFunction  (2)

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

Wolfram Language code: DistributionChart[RandomVariate[NormalDistribution[], {5, 20}]]

Define a labeling function and place it in the tooltip:

Wolfram Language code: label[data_, index_, label_] := Grid[{{"Case:", index[[2]]}, {"Year:", label[[2, 1]]}, {"μ:", Mean[data]}}, Alignment -> {{Right, Left}}]
Wolfram Language code: DistributionChart[RandomVariate[NormalDistribution[], {5, 20}], LabelingFunction -> (Placed[label[##], Tooltip]&), ChartLabels -> Placed[Range[2005, 2009], None]]

LabelingSize  (4)

Textual labels are shown at their actual sizes:

Wolfram Language code: DistributionChart[RandomVariate[NormalDistribution[], {5, 20}], ChartLabels -> {"healthfulness", "obstreperous", "spectrogram", "vestige", "coinage", "limey"}]

Image labels are automatically resized:

Wolfram Language code: DistributionChart[RandomVariate[NormalDistribution[], {5, 20}], PlotLabels -> Placed[{[image], [image], [image], [image], [image]}, Axis]]

Specify a maximum size for textual labels:

Wolfram Language code: DistributionChart[RandomVariate[NormalDistribution[], {5, 20}], PlotLabels -> {"healthfulness", "obstreperous", "spectrogram", "vestige", "coinage", "limey"}, LabelingSize -> 50]

Specify a maximum size for image labels:

Wolfram Language code: DistributionChart[RandomVariate[NormalDistribution[], {5, 20}], PlotLabels -> {[image], [image], [image], [image], [image]}, LabelingSize -> 30]

Show image labels at their natural sizes:

Wolfram Language code: DistributionChart[RandomVariate[NormalDistribution[], {5, 20}], PlotLabels -> {"healthfulness", "obstreperous", "spectrogram", "vestige", "coinage", "limey"}, LabelingSize -> Full, ImageSize -> Medium]

Method  (1)

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

Wolfram Language code: data = Table[RandomReal[NormalDistribution[], i], {i, {100, 400, 900, 1600}}];
Wolfram Language code: DistributionChart[data, Method -> {"BoxWidth" -> "Scaled"}, PlotLabels -> Length /@ data]

Put bars on fixed positions with varying bar spacing:

Wolfram Language code: DistributionChart[data, Method -> {"BoxWidth" -> "Scaled", "EqualSpacing" -> False}, PlotLabels -> Length /@ data]

Use constant width bars:

Wolfram Language code: DistributionChart[data, Method -> {"BoxWidth" -> "Fixed"}]

PerformanceGoal  (3)

Generate a distribution chart with interactive highlighting:

Wolfram Language code: DistributionChart[RandomVariate[NormalDistribution[], {5, 20}], PerformanceGoal -> "Quality"]

Emphasize performance by disabling interactive behaviors:

Wolfram Language code: DistributionChart[RandomVariate[NormalDistribution[], {5, 20}], PerformanceGoal -> "Speed"]

Typically, less memory is required for non-interactive charts:

Wolfram Language code: Table[ByteCount@DistributionChart[RandomVariate[NormalDistribution[], {5, 100}], PerformanceGoal -> p], {p, {"Quality", "Speed"}}]

PlotInteractivity  (4)

Charts with a moderate number of bars automatically have tooltips and mouseover effects:

Wolfram Language code: DistributionChart[{IconizedObject[«Subscript[data, 1]»], IconizedObject[«Subscript[data, 2]»], IconizedObject[«Subscript[data, 3]»], IconizedObject[«Subscript[data, 4]»]}]

Turn off all the interactive elements:

Wolfram Language code: DistributionChart[{IconizedObject[«Subscript[data, 1]»], IconizedObject[«Subscript[data, 2]»], IconizedObject[«Subscript[data, 3]»], IconizedObject[«Subscript[data, 4]»]}, PlotInteractivity -> False]

Interactive elements provided as part of the input are disabled:

Wolfram Language code: DistributionChart[{IconizedObject[«Subscript[data, 1]»], IconizedObject[«Subscript[data, 2]»], IconizedObject[«Subscript[data, 3]»], Tooltip[IconizedObject[«Subscript[data, 4]»], "hello"]}, PlotInteractivity -> False]

Allow provided interactive elements and disable automatic ones:

Wolfram Language code: DistributionChart[{IconizedObject[«Subscript[data, 1]»], IconizedObject[«Subscript[data, 2]»], IconizedObject[«Subscript[data, 3]»], Tooltip[IconizedObject[«Subscript[data, 4]»], "hello"]}, PlotInteractivity -> <|"User" -> True, "System" -> False|>]

PlotTheme  (1)

Use a theme with bright colors and grid lines:

Wolfram Language code: data = RandomVariate[NormalDistribution[RandomInteger[5], 1], {3, 3, 100}];
Wolfram Language code: DistributionChart[data, PlotTheme -> "Business"]

Add a theme with frame and vertical lines:

Wolfram Language code: DistributionChart[data, PlotTheme -> {"Business", "FrameGrid"}]

Change the grid lines style:

Wolfram Language code: DistributionChart[data, PlotTheme -> {"Business", "FrameGrid"}, GridLinesStyle -> LightRed]

ScalingFunctions  (2)

Linear scale is used by default:

Wolfram Language code: DistributionChart[RandomReal[NormalDistribution[50, 10], {3, 100}]]

Use log scale in coordinate:

Wolfram Language code: DistributionChart[RandomReal[NormalDistribution[50, 10], {3, 100}], ScalingFunctions -> "Log"]

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

Wolfram Language code: data = Range[50] - 25
Wolfram Language code: DistributionChart[{data}, ScalingFunctions -> "Log"]

Applications  (2)

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

Wolfram Language code: salaries = ExampleData[{"Statistics", "UniversitySalaries"}, "DataElements"]; depts = {"Mathematics", "History", "English", "Chemistry", "Law", "Physics", "Statistics"}; data = Table[Cases[salaries, {d, _, salary_, "A"} :> salary], {d, depts}]; all = Cases[salaries, {_, _, salary_, "A"} :> salary];
Wolfram Language code: DistributionChart[data, PlotLabels -> Placed[{depts, Length /@ data}, {Axis, Center}], ChartStyle -> 54, GridLines -> {{{Median[all], Gray}}, None}, BarOrigin -> Left]

Compare different time slices for a random process:

Wolfram Language code: data = Table[RandomVariate[WienerProcess[2, 3][t], 10 ^ 3], {t, {1, 4, 7, 10, 13}}];
Wolfram Language code: DistributionChart[data, PlotLabels -> {1, 4, 7, 10, 13}]

Properties & Relations  (6)

Use BoxWhiskerChart to show the distribution of data:

Wolfram Language code: data = Table[RandomVariate[NormalDistribution[μ, 1], 100], {μ, 0, 4, 1}];
Wolfram Language code: BoxWhiskerChart[data]

BoxWhiskerChart is a special case of DistributionChart:

Wolfram Language code: data = Table[RandomVariate[NormalDistribution[μ, 1], 100], {μ, 0, 4, 1}];
Wolfram Language code: DistributionChart[data, "BoxWhisker"]

Use Histogram and SmoothHistogram to visualize lists of data vectors:

Wolfram Language code: data = Table[RandomVariate[NormalDistribution[μ, 1], 200], {μ, 0, 8, 4}];
Wolfram Language code: {Histogram[data, Automatic, "PDF"], SmoothHistogram[data]}

The default shapes used by DistributionChart are effectively generated using SmoothHistogram:

Wolfram Language code: data = RandomVariate[NormalDistribution[], 25];
Wolfram Language code: {DistributionChart[data, BarOrigin -> Left], SmoothHistogram[data]}

Use QuantilePlot and ProbabilityPlot to compare data to distributions:

Wolfram Language code: data = RandomVariate[NormalDistribution[0, 1], 200];
Wolfram Language code: {QuantilePlot[data], ProbabilityPlot[data]}

Use Histogram3D and SmoothHistogram3D to visualize 2D data:

Wolfram Language code: data = RandomVariate[NormalDistribution[2, 1], {200, 2}];
Wolfram Language code: {Histogram3D[data], SmoothHistogram3D[data]}

See Also

BoxWhiskerChart  Histogram  QuantilePlot  BarChart  ListLinePlot  Quantile

Related Guides

    ▪
  • Statistical Visualization
  • ▪
  • Time Series Processing
  • ▪
  • Date & Time Visualization
  • ▪
  • Random Variables
  • ▪
  • Event Series Processing
  • ▪
  • Tabular Visualization

History

Introduced in 2010 (8.0) | Updated in 2012 (9.0) ▪ 2014 (10.0) ▪ 2018 (11.3) ▪ 2025 (14.2) ▪ 2025 (14.3)

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

Text

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

CMS

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

APA

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

BibTeX

@misc{reference.wolfram_2026_distributionchart, author="Wolfram Research", title="{DistributionChart}", year="2025", howpublished="\url{https://reference.wolfram.com/language/ref/DistributionChart.html}", note=[Accessed: 01-September-2026]}

BibLaTeX

@online{reference.wolfram_2026_distributionchart, organization={Wolfram Research}, title={DistributionChart}, year={2025}, url={https://reference.wolfram.com/language/ref/DistributionChart.html}, note=[Accessed: 01-September-2026]}

Top
Introduction for Programmers
Introductory Book
Wolfram Function Repository | Wolfram Data Repository | Wolfram Data Drop | Wolfram Language Products
Top
  • Products
  • Wolfram|One
  • Mathematica
  • AI Access
  • Compute Services
  • System Modeler

  • Wolfram|Alpha Notebook Edition
  • Wolfram|Alpha Pro
  • Mobile Apps

  • Wolfram Engine
  • Wolfram Player

  • Volume & Site Licensing
  • Server Deployment Options
  • Consulting
  • Wolfram Consulting
  • Repositories
  • Data Repository
  • Function Repository
  • Community Paclet Repository
  • Neural Net Repository
  • Prompt Repository

  • Wolfram Language Example Repository
  • Notebook Archive
  • Wolfram GitHub
  • Learning
  • Wolfram U
  • Wolfram Language Documentation
  • Webinars & Training
  • Educational Programs

  • Wolfram Language Introduction
  • Fast Introduction for Programmers
  • Fast Introduction for Math Students
  • Books

  • Wolfram Community
  • Wolfram Blog
  • Public Resources
  • Wolfram|Alpha
  • Wolfram Problem Generator
  • Wolfram Challenges

  • Computer-Based Math
  • Computational Thinking
  • Computational Adventures

  • Demonstrations Project
  • Wolfram Data Drop
  • MathWorld
  • Wolfram Science
  • Wolfram Media Publishing
  • Customer Resources
  • Store
  • Product Downloads
  • User Portal
  • Your Account
  • Organization Access

  • Support FAQ
  • Contact Support
  • Company
  • About Wolfram
  • Careers
  • Contact
  • Events
Wolfram Community Wolfram Blog
Legal & Privacy Policy
WolframAlpha.com | WolframCloud.com
© 2026 Wolfram
© 2026 Wolfram | Legal & Privacy Policy |
English