THIS IS DOCUMENTATION FOR AN OBSOLETE PRODUCT.
SEE THE DOCUMENTATION CENTER FOR THE LATEST INFORMATION.

# Histogram

 Histogram[{x1, x2, ...}] plots a histogram of the values xi. Histogram[{x1, x2, ...}, w]plots a histogram with bin width specification w. Histogram[{x1, x2, ...}, w, hspec]plots a histogram with bin heights computed according to the specification hspec. Histogram[{data1, data2, ...}, ...]plots histograms for multiple datasets datai.
• Histogram[data] by default plots a histogram with equal bin widths chosen to approximate an assumed underlying smooth distribution of the values xi.
• The following bin width specifications can be given:
 n use n bins {dx} use bins of width dx {xmin,xmax,dx} use bins of width dx from xmin to xmax {{b1,b2,...}} use the bins [b1, b2), [b2, b3), ... Automatic determine bin widths automatically "name" use a named binning method fw apply fw to get an explicit bin specification {b1, b2, ...}
• Possible named binning methods include:
 "Sturges" compute the number of bins based on the length of data "Scott" asymptotically minimize the mean square error "FreedmanDiaconis" twice the interquartile range divided by the cube root of sample size "Wand" one-level recursive approximate Wand binning "Log" logarithmic bin widths
• The function fw in Histogram[data, fw] is applied to a list of all xi, and should return an explicit bin list {b1, b2, ...}.
• Different forms of histogram can be obtained by giving different bin height specifications hspec in Histogram[data, w, hspec]. The following forms can be used:
 "Count" the number of values lying in each bin "Probability" fraction of values lying in each bin "ProbabilityDensity" fraction of values divided by bin width "LogCount", "LogProbability", "LogProbabilityDensity" logarithmic heights fh heights obtained by applying fh to bins and counts
• The function fh in Histogram[data, w, fh] is applied to two arguments: a list of bins {{b1, b2}, {b2, b3}, ...}, and corresponding list of counts {c1, c2, ...}. The function should return a list of heights to be used for each of the ci.
• Only values xi that are real numbers are assigned to bins; others are taken to be missing.
• In Histogram[{data1, data2, ...}, ...], automatic bin locations are determined by combining all the datasets datai.
• Histogram[{..., wi[datai, ...], ...}, ...] renders the histogram elements associated with dataset datai according to the specification defined by the symbolic wrapper wi.
 AspectRatio 1/GoldenRatio overall ratio of width to height Axes True whether to draw axes BarOrigin Bottom origin of histogram bars ChartBaseStyle Automatic overall style for bars ChartElementFunction Automatic how to generate raw graphics for bars ChartElements Automatic graphics to use in each of the bars ChartLabels None category labels for datasets ChartLayout Automatic overall layout to use ChartStyle Automatic style for bars ChartLegends None legends for data elements and datasets ColorFunction Automatic how to color bars ColorFunctionScaling True whether to normalize arguments to ColorFunction LabelingFunction Automatic how to label elements LegendAppearance Automatic overall appearance of legends PerformanceGoal \$PerformanceGoal aspects of performance to try to optimize
• Possible settings for ChartLayout include "Overlapped" and "Stacked".
• The arguments supplied to ChartElementFunction are the bin region {{xmin, xmax}, {ymin, ymax}}, the bin values lists, 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["Histogram"].
• The argument supplied to ColorFunction is the height for each bin.
Generate a histogram for a list of values:
Multiple datasets:
Generate a probability histogram for a list of values:
Pictorial bars:
Use procedural bars:
Generate a histogram for a list of values:
 Out[1]=

Multiple datasets:
 Out[2]=

Generate a probability histogram for a list of values:
 Out[1]=

Pictorial bars:
 Out[1]=
Use procedural bars:
 Out[2]=
 Scope   (21)
Specify the number of bins to use:
Specify the bin width:
The bin delimiters:
The bin delimiters as an explicit list:
Use different automatic binning methods:
Use logarithmically spaced bins:
Delimit bins on integer boundaries using a binning function:
Use different height specifications:
Use a height function that accumulate the bin counts:
Bins associated with a dataset are styled the same:
Non-real data is taken to be missing:
Use different layouts to display multiple datasets:
Control the origin of bars:
Use wrappers on individual data, datasets or collections of datasets:
Wrappers can be nested:
Override the default tooltips:
Use PopupWindow to provide additional drilldown information:
Button can be used to trigger any action:
Use an explicit list of styles for the bars:
Use any gradient or indexed color schemes from ColorData:
ChartBaseStyle can be used to set an initial style for all chart elements:
Style can be used to override styles:
Use any graphic for pictorial bars:
Use built-in programmatically generated bars:
For detailed settings use PalettesChartElementSchemes:
Use Labeled to add a label to a dataset:
Use symbolic positions for label placement:
Provide value labels for bars by using LabelingFunction:
Use Placed to control placement and formatting:
Add categorical legend entries for datasets:
Use Placed to affect the positioning of legends:
 Options   (47)
Change the bar origin:
Use ChartBaseStyle to style bars:
ChartBaseStyle combines with ChartStyle:
ChartStyle may override settings for ChartBaseStyle:
ChartBaseStyle combines with Style:
Style may override settings for ChartBaseStyle:
ColorFunction may override settings for ChartBaseStyle:
Create a pictorial chart based on any Graphics object:
Use a stretched version of the graphic:
Use explicit sizes for width and height:
Using All for width or height causes that direction to stretch to the full size of the bar:
Use a different graphic for each row of data:
Graphics are used cyclically:
Styles are inherited from styles set through ChartStyle etc:
Style can override the settings from ChartStyle:
Explicit styles set in the graphic will override other style settings:
Get a list of built-in settings for ChartElementFunction:
For detailed settings use PalettesChartElementSchemes:
ChartElementFunction appropriate to show the global scale:
Write a custom ChartElementFunction:
Built-in element function may have options, use PalettesChartElementSchemes to set them:
Place dataset labels above each histogram:
Labeled wrappers around datasets will place additional labels:
Use Placed to control label placement:
Symbolic positions outside the bar:
Coordinate-based placement relative to a histogram:
Place all labels at the lower-left corner and vary the coordinates within the label:
Use the third argument to Placed to control formatting:
Use a named formatting function:
Place multiple labels:
Use different layouts to display multiple datasets:
With multiple datasets that are fairly disjoint typically "Overlapped" works better:
Generate a legend based on chart style:
Use Legended to specify indvidual legend entries:
Use Placed to control the placement of legends:
Use ChartStyle to style bars:
Give a list of styles:
Use "Indexed" colors from ColorData:
Styles are used cyclically:
Style overrides settings for ChartStyle:
ColorFunction overrides settings for ChartStyle:
ChartElements may override settings for ChartStyle:
Color by bar height:
Use , to get unscaled height values:
ColorFunction overrides styles in ChartStyle:
Use ColorFunction to combine different style effects:
By default scaled height values are used:
Use , to get unscaled height values:
Use automatic labeling by values through Tooltip and StatusArea:
Do no labeling:
Use Placed to control label placement:
Coordinate based placement relative to a bar:
Control the formatting of labels:
Use the dataset position index to generate the label:
Use the given chart labels as arguments to the labeling function:
Generate a bar chart with interactive highlighting:
Emphasize performance, by disabling interactive behaviors:
Typically less memory is required non-interactive charts:
 Applications   (13)
Overlay a plot of the PDF for a normal distribution:
Number of elements discovered each decade since 1700 to 2000:
Create a histogram of reference page sizes in Mathematica:
Distribution of lengths of human chromosomes:
Create a ListLinePlot using counts extracted from a histogram:
Click on a dataset in the histogram to hear an acoustic representation of the counts:
Click on the bars to hear the counts in the corresponding bin:
Create a matrix of handwritten digits using GraphicsDrawing Tools:
Compute the histogram of line angles used in a character drawing:
Create histograms for each digit showing the freqency of line angles:
Create a stacked histogram of male and female life expectancy for all countries:
Select a subset of languages available in DictionaryLookup:
Mouse over the bars to get the word counts with a particular string length:
Distribution of frequencies:
Create a cumulative histogram:
Create a stacked cumulative histogram:
Wind direction from WeatherData ranges from 0° to 360°:
Get wind direction data for Willard Airport (CMI) at Champaign, Illinois:
Define a chart element function that stores bin width and count data usng Sow:
Create a histogram of the wind directions, and store the bin width and frequencies:
Create a polar histogram of the wind direction frequencies:
Histogram automatically determine bins to use based on data:
Use BinCounts to for explicit binning of data:
Display using BarChart:
Use PDF to get parametric probability density function:
Show together with Histogram of random data:
Overlay several PDF plots for Poisson distributions:
New in 7
 Site Index Choose Language