Products
  • Wolfram|One

    The definitive Wolfram Language and notebook experience

  • Mathematica

    The original technical computing environment

  • Notebook Assistant + LLM Kit

    All-in-one AI assistance for your Wolfram experience

  • Compute Services
  • System Modeler
  • Finance Platform
  • Wolfram|Alpha Notebook Edition
  • Application Server
  • Enterprise Private Cloud
  • Wolfram Engine
  • Wolfram Player
  • Wolfram Cloud App
  • Wolfram Player App

More mobile apps

Core Technologies of Wolfram Products

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

Deployment Options

  • Wolfram Cloud
  • wolframscript
  • Wolfram Engine Community Edition
  • Wolfram LLM API
  • WSTPServer
  • Wolfram|Alpha APIs

From the Community

  • Function Repository
  • Community Paclet Repository
  • Example Repository
  • Neural Net Repository
  • Prompt Repository
  • Wolfram Demonstrations
  • Data Repository
  • Group & Organizational Licensing
  • All Products
Consulting & Solutions

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

  • Data & Computational Intelligence
  • Model-Based Design
  • Algorithm Development
  • Wolfram|Alpha for Business
  • Blockchain Technology
  • Education Technology
  • Quantum Computation

Wolfram Consulting

Wolfram Solutions

  • Data Science
  • Artificial Intelligence
  • Biosciences
  • Healthcare Intelligence
  • Sustainable Energy
  • Control Systems
  • Enterprise Wolfram|Alpha
  • Blockchain Labs

More Wolfram Solutions

Wolfram Solutions For Education

  • Research Universities
  • Colleges & Teaching Universities
  • Junior & Community Colleges
  • High Schools
  • Educational Technology
  • 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/STEAM
  • 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
Wolfram|Alpha
  • Your Account
  • User Portal
  • Wolfram Cloud
  • Products
    • Wolfram|One
    • Mathematica
    • Notebook Assistant + LLM Kit
    • Compute Services
    • System Modeler
    • Finance Platform
    • Wolfram|Alpha Notebook Edition
    • Application Server
    • Enterprise Private Cloud
    • Wolfram Engine
    • Wolfram Player
    • Wolfram Cloud App
    • Wolfram Player App

    More mobile apps

    • Core Technologies
      • Wolfram Language
      • Computable Data
      • Wolfram Notebooks
      • AI & Linguistic Understanding
    • Deployment Options
      • Wolfram Cloud
      • wolframscript
      • Wolfram Engine Community Edition
      • Wolfram LLM API
      • WSTPServer
      • Wolfram|Alpha APIs
    • From the Community
      • Function Repository
      • Community Paclet Repository
      • Example Repository
      • Neural Net Repository
      • Prompt Repository
      • Wolfram Demonstrations
      • Data Repository
    • Group & Organizational Licensing
    • All Products
  • Consulting & Solutions

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

    WolframConsulting.com

    Wolfram Solutions

    • Data Science
    • Artificial Intelligence
    • Biosciences
    • Healthcare Intelligence
    • Sustainable Energy
    • Control Systems
    • Enterprise Wolfram|Alpha
    • Blockchain Labs

    More Wolfram Solutions

    Wolfram Solutions For Education

    • Research Universities
    • Colleges & Teaching Universities
    • Junior & Community Colleges
    • High Schools
    • Educational Technology
    • 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/STEAM
      • 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
  • Wolfram|Alpha
  • Wolfram Cloud
  • Your Account
  • User Portal
Wolfram Language & System Documentation Center
Histogram
  • See Also
    • PairedHistogram
    • Histogram3D
    • DensityHistogram
    • HistogramList
    • SmoothHistogram
    • HistogramDistribution
    • ListPlot
    • BinCounts
    • Tally
    • BarChart
    • ImageHistogram
    • DiscretePlot
    • PDF
  • Related Guides
    • Statistical Visualization
    • Numerical Data
    • Probability & Statistics with Quantities
    • Statistical Data Analysis
    • Data Visualization
    • Charting and Information Visualization
    • Tabular Visualization
    • Descriptive Statistics
    • Signal Processing
    • Random Variables
    • Using the Wolfram Data Drop
    • Reliability
    • Nonparametric Statistical Distributions
    • Signal Visualization & Analysis
    • Scientific Data Analysis
    • Time Series Processing
    • Tabular Processing Overview
    • Tabular Communication
    • See Also
      • PairedHistogram
      • Histogram3D
      • DensityHistogram
      • HistogramList
      • SmoothHistogram
      • HistogramDistribution
      • ListPlot
      • BinCounts
      • Tally
      • BarChart
      • ImageHistogram
      • DiscretePlot
      • PDF
    • Related Guides
      • Statistical Visualization
      • Numerical Data
      • Probability & Statistics with Quantities
      • Statistical Data Analysis
      • Data Visualization
      • Charting and Information Visualization
      • Tabular Visualization
      • Descriptive Statistics
      • Signal Processing
      • Random Variables
      • Using the Wolfram Data Drop
      • Reliability
      • Nonparametric Statistical Distributions
      • Signal Visualization & Analysis
      • Scientific Data Analysis
      • Time Series Processing
      • Tabular Processing Overview
      • Tabular Communication

Histogram[{x1,x2,…}]

plots a histogram of the values xi.

Histogram[{x1,x2,…},bspec]

plots a histogram with bin width specification bspec.

Histogram[{x1,x2,…},bspec,hspec]

plots a histogram with bin heights computed according to the specification hspec.

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

plots histograms for multiple datasets datai.

Details and Options
Details and Options Details and Options
Examples  
Basic Examples  
Scope  
Data and Layouts  
Tabular Data  
Wrappers  
Styling and Appearance  
Labeling and Legending  
Options  
AspectRatio  
Axes  
AxesLabel  
Show More Show More
AxesOrigin  
AxesStyle  
BarOrigin  
ChartBaseStyle  
ChartElementFunction  
ChartElements  
ChartLabels  
ChartLayout  
ChartLegends  
ChartStyle  
ColorFunction  
ColorFunctionScaling  
ImageSize  
LabelingFunction  
PerformanceGoal  
PlotInteractivity  
PlotRange  
PlotRangePadding  
PlotTheme  
Applications  
Properties & Relations  
Possible Issues  
Neat Examples  
See Also
Related Guides
Related Links
History
Cite this Page
BUILT-IN SYMBOL
  • See Also
    • PairedHistogram
    • Histogram3D
    • DensityHistogram
    • HistogramList
    • SmoothHistogram
    • HistogramDistribution
    • ListPlot
    • BinCounts
    • Tally
    • BarChart
    • ImageHistogram
    • DiscretePlot
    • PDF
  • Related Guides
    • Statistical Visualization
    • Numerical Data
    • Probability & Statistics with Quantities
    • Statistical Data Analysis
    • Data Visualization
    • Charting and Information Visualization
    • Tabular Visualization
    • Descriptive Statistics
    • Signal Processing
    • Random Variables
    • Using the Wolfram Data Drop
    • Reliability
    • Nonparametric Statistical Distributions
    • Signal Visualization & Analysis
    • Scientific Data Analysis
    • Time Series Processing
    • Tabular Processing Overview
    • Tabular Communication
    • See Also
      • PairedHistogram
      • Histogram3D
      • DensityHistogram
      • HistogramList
      • SmoothHistogram
      • HistogramDistribution
      • ListPlot
      • BinCounts
      • Tally
      • BarChart
      • ImageHistogram
      • DiscretePlot
      • PDF
    • Related Guides
      • Statistical Visualization
      • Numerical Data
      • Probability & Statistics with Quantities
      • Statistical Data Analysis
      • Data Visualization
      • Charting and Information Visualization
      • Tabular Visualization
      • Descriptive Statistics
      • Signal Processing
      • Random Variables
      • Using the Wolfram Data Drop
      • Reliability
      • Nonparametric Statistical Distributions
      • Signal Visualization & Analysis
      • Scientific Data Analysis
      • Time Series Processing
      • Tabular Processing Overview
      • Tabular Communication

Histogram

Histogram[{x1,x2,…}]

plots a histogram of the values xi.

Histogram[{x1,x2,…},bspec]

plots a histogram with bin width specification bspec.

Histogram[{x1,x2,…},bspec,hspec]

plots a histogram with bin heights computed according to the specification hspec.

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

plots histograms for multiple datasets datai.

Details and Options

  • Histogram[data] by default plots a histogram with equal bin widths chosen to approximate an assumed underlying smooth distribution of the values xi.
  • Data values xi can be given in the following forms:
  • xia number
    Quantity[xi,unit]a number with a unit
  • Datasets datai have the following forms and interpretations:
  • {x1,x2,…}a list of values xi
    <|k1x1,k2x2,…|>the values xi from the association
    QuantityArraythe magnitudes
    TimeSeries,EventSeries,…the values from time series data
    WeightedDatathe count for each value is its weight
    w[datai]wrapper w for dataset datai
  • Histogram[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:
  • colxcreate a histogram for the values in column colx
    {colx1,colx2,…}create histograms for columns colx1, colx2, …
  • The following bin width specifications bspec can be given:
  • nuse 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),…
    Automaticdetermine bin widths automatically
    "name"use a named binning method
    {"Log",bspec}apply binning bspec on log-transformed data
    fbapply fb to get an explicit bin specification {b1,b2,…}
  • The binning specification "Log" is taken to use the Automatic underlying binning method.
  • 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
    "Knuth"balance likelihood and prior probability of a piecewise uniform model
    "Wand"one-level recursive approximate Wand binning
  • The function fb in Histogram[data,fb] 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,bspec,hspec]. The following forms can be used:
  • "Count"number of elements in each bin
    "CumulativeCount"cumulative counts
    "SurvivalCount"survival counts
    "Probability"fraction of values lying in each bin
    "Intensity"count divided by bin width
    "PDF"probability density function
    "CDF"cumulative distribution function
    "SF"survival function
    "HF"hazard function
    "CHF"cumulative hazard function
    {"Log",hspec}log-transformed height specification
    fhheights obtained by applying fh to bins and counts
  • The function fh in Histogram[data,bspec,fh] is applied to two arguments: a list of bins {{b1,b2},{b2,b3},…}, and a 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.
  • The following wrappers can be used for chart elements:
  • 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
  • Histogram has the same options as Graphics with the following additions and changes: [List of all options]
  • AspectRatio 1/GoldenRatioratio of height to width
    Axes Truewhether to draw axes
    BarOrigin Bottomorigin of histogram bars
    ChartBaseStyle Automaticoverall style for bars
    ChartElementFunction Automatichow to generate raw graphics for bars
    ChartElements Automaticgraphics to use in each of the bars
    ChartLabels Nonecategory labels for datasets
    ChartLayout Automaticoverall layout to use
    ChartLegends Nonelegends for data elements and datasets
    ChartStyle Automaticstyle for bars
    ColorFunction Automatichow to color bars
    ColorFunctionScaling Truewhether to normalize arguments to ColorFunction
    LabelingFunction Automatichow to label elements
    LegendAppearanceAutomaticoverall appearance of legends
    PerformanceGoal $PerformanceGoalaspects of performance to try to optimize
    PlotInteractivity $PlotInteractivitywhether to allow interactive elements
    PlotTheme $PlotThemeoverall theme for the histogram
    ScalingFunctionsNonehow to scale individual coordinates
    TargetUnitsAutomaticunits to display in the chart
  • The following settings for ChartLayout can be used to display multiple sets of data:
  • "Overlapped"show all the data overlapping
    "Stacked"accumulate the data per bin
  • Possible settings for ChartLayout that show single groups of bars in multiple chart panels include:
  • "Column"use separate groups of bars in a column of panels
    "Row"use separate groups of bars in a row of panels
    {"Column",k},{"Row",k}use k columns or rows
    {"Column",UpTo[k]},{"Row",UpTo[k]}use at most k columns or rows
  • 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.
  • With ScalingFunctions->{sx,sy}, the coordinate is scaled using sx etc.
  • Style and other specifications from options and other constructs in BarChart are effectively applied in the order ChartStyle, ColorFunction, Style and other wrappers, ChartElements, and ChartElementFunction, with later specifications overriding earlier ones.
  • List of all options
  • Highlight options with settings specific to Histogram
  • AlignmentPointCenterthe default point in the graphic to align with
    AspectRatio1/GoldenRatioratio of height to width
    AxesTruewhether to draw axes
    AxesLabelNoneaxes labels
    AxesOriginAutomaticwhere axes should cross
    AxesStyle{}style specifications for the axes
    BackgroundNonebackground color for the plot
    BarOriginBottomorigin of histogram bars
    BaselinePositionAutomatichow to align with a surrounding text baseline
    BaseStyle{}base style specifications for the graphic
    ChartBaseStyleAutomaticoverall style for bars
    ChartElementFunctionAutomatichow to generate raw graphics for bars
    ChartElementsAutomaticgraphics to use in each of the bars
    ChartLabelsNonecategory labels for datasets
    ChartLayoutAutomaticoverall layout to use
    ChartLegendsNonelegends for data elements and datasets
    ChartStyleAutomaticstyle for bars
    ColorFunctionAutomatichow to color bars
    ColorFunctionScalingTruewhether to normalize arguments to ColorFunction
    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
    FrameFalsewhether to put a frame around the plot
    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 elements
    LabelStyle{}style specifications for labels
    LegendAppearanceAutomaticoverall appearance of legends
    MethodAutomaticdetails of graphics 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 histogram
    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 histogram for a list of values:

Multiple datasets:

Generate a probability histogram for a list of values:

Show multiple datasets as a row of individual histograms:

Scope  (33)

Data and Layouts  (19)

Specify the number of bins to use:

Specify the bin width:

The bin delimiters:

The bin delimiters as an explicit list:

Bins for discrete values are centered over the values when possible:

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 accumulates the bin counts:

Bins associated with a dataset are styled the same:

Nonreal data is taken to be missing:

The data may include units:

Specify units to use:

Specify binning spec with units:

The values in an association are used as elements:

Associations can be nested:

Use the keys as labels:

Use the keys as legends:

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

Weights in WeightedData affect the shape of histogram:

The censoring and truncation information in EventData also affects the histogram:

Use different layouts to display multiple datasets:

Use rows and columns of individual plots to show multiple sets:

Control the origin of bars:

Tabular Data  (1)

Get tabular data:

Generate a histogram for city mileage:

Create overlaid histograms for city and highway mileage:

Use smaller bin sizes for the data:

View the distributions side by side:

Wrappers  (2)

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:

Styling and Appearance  (4)

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 Palettes ▶ ChartElementSchemes:

Use a monochrome theme:

Labeling and Legending  (7)

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 Legended to add additional legend entries:

Use Placed to affect the positioning of legends:

Options  (84)

AspectRatio  (3)

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

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

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

Axes  (4)

By default, Axes are drawn:

Use AxesFalse to turn off axes:

Use AxesOrigin to specify where the axes intersect:

Turn each axis on individually:

AxesLabel  (4)

No axes labels are drawn by default:

Place a label on the axis:

Specify axes labels:

Use units as labels:

AxesOrigin  (2)

The position of the axes is determined automatically:

Specify an explicit origin for the axes:

AxesStyle  (4)

Change the style for the axes:

Specify the style of each axis:

Use different styles for the ticks and the axes:

Use different styles for the labels and the axes:

BarOrigin  (1)

Change the bar origin:

ChartBaseStyle  (4)

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:

ChartBaseStyle combines with ColorFunction:

ColorFunction may override settings for ChartBaseStyle:

ChartElementFunction  (4)

Get a list of built-in settings for ChartElementFunction:

For detailed settings, use Palettes ▶ ChartElementSchemes:

ChartElementFunction is appropriate to show the global scale:

Write a custom ChartElementFunction:

Built-in element functions may have options; use Palettes ▶ ChartElementSchemes to set them:

ChartElements  (9)

Create a pictorial chart based on any Graphics object:

Graphics3D:

Image:

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:

Create true 3D-shaded bars:

ChartLabels  (6)

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:

Use a hyperlink label:

Place multiple labels:

ChartLayout  (5)

Use different layouts to display multiple datasets:

With multiple datasets that are fairly disjoint, typically "Overlapped" works better:

Place each group of bars in a separate panel using shared axes:

Use a row instead of a column:

Use multiple columns or rows:

Prefer full columns or rows:

ChartLegends  (2)

Generate a legend based on chart style:

Use Legended to add additional legend entries:

Use Legended to specify individual legend entries:

Use Placed to control the placement of legends:

ChartStyle  (5)

Use ChartStyle to style bars:

Give a list of styles:

Use "Gradient" colors from ColorData:

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:

ColorFunction  (4)

Color by bar height:

Use ColorFunctionScaling->False to get unscaled height values:

ColorFunction overrides styles in ChartStyle:

Use ColorFunction to combine different style effects:

ColorFunctionScaling  (2)

By default, scaled height values are used:

Use ColorFunctionScaling->False to get unscaled height values:

ImageSize  (7)

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

Specify the width of the plot:

Specify the height of the plot:

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

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

Setting AspectRatioFull will fill the available space:

Use maximum sizes for the width and height:

Use ImageSizeFull to fill the available space in an object:

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

LabelingFunction  (7)

Use automatic labeling by values through Tooltip and StatusArea:

Do no labeling:

Use symbolic positions 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:

PerformanceGoal  (1)

Generate a bar chart with interactive highlighting:

Emphasize performance by disabling interactive behaviors:

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

PlotInteractivity  (4)

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

Turn off all the interactive elements:

Interactive elements provided as part of the input are disabled:

Allow provided interactive elements and disable automatic ones:

PlotRange  (1)

PlotRange is automatically calculated:

Show all bins:

PlotRangePadding  (3)

Specify a single plot range padding for all directions:

Specify a separate plot range padding for horizontal and vertical directions:

Specify a separate plot range padding for each direction:

PlotTheme  (2)

Use a theme with simple ticks and grid lines in a high-contrast color scheme:

Change the color scheme:

Applications  (14)

Overlay a plot of the PDF for a normal distribution:

Number of elements discovered each decade from 1700 to 2000:

Create a histogram of reference page sizes in the Wolfram System:

Distribution of lengths of human chromosomes:

Create a ListLinePlot using counts extracted from a histogram:

Click a dataset in the histogram to hear an acoustic representation of the counts:

Click the bars to hear the counts in the corresponding bin:

Create a matrix of handwritten digits using Graphics ▶ Drawing Tools:

Compute the histogram of line angles used in a character drawing:

Create histograms for each digit showing the frequency 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:

Power spectrum of the Thue–Morse nested sequence [more info]:

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 using 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 for the slice distribution of a random process:

Histogram for several slices of a process:

Properties & Relations  (3)

Histogram automatically determines bins to use based on data:

Use BinCounts for explicit binning of data:

Display using BarChart:

Use PDF to get a parametric probability density function:

Show together with Histogram of random data:

Possible Issues  (2)

Discrete values that don't align with the bin width can result in gaps:

Bins include the left endpoint but not the right, which can result in unexpected bins:

The value 1 is not included in this histogram because it would be in the bin :

Neat Examples  (1)

Overlay several PDF plots for Poisson distributions:

See Also

PairedHistogram  Histogram3D  DensityHistogram  HistogramList  SmoothHistogram  HistogramDistribution  ListPlot  BinCounts  Tally  BarChart  ImageHistogram  DiscretePlot  PDF

Related Guides

    ▪
  • Statistical Visualization
  • ▪
  • Numerical Data
  • ▪
  • Probability & Statistics with Quantities
  • ▪
  • Statistical Data Analysis
  • ▪
  • Data Visualization
  • ▪
  • Charting and Information Visualization
  • ▪
  • Tabular Visualization
  • ▪
  • Descriptive Statistics
  • ▪
  • Signal Processing
  • ▪
  • Random Variables
  • ▪
  • Using the Wolfram Data Drop
  • ▪
  • Reliability
  • ▪
  • Nonparametric Statistical Distributions
  • ▪
  • Signal Visualization & Analysis
  • ▪
  • Scientific Data Analysis
  • ▪
  • Time Series Processing
  • ▪
  • Tabular Processing Overview
  • ▪
  • Tabular Communication

Related Links

  • An Elementary Introduction to the Wolfram Language : More Forms of Visualization

History

Introduced in 2008 (7.0) | Updated in 2010 (8.0) ▪ 2012 (9.0) ▪ 2014 (10.0) ▪ 2015 (10.2) ▪ 2021 (13.0) ▪ 2025 (14.2) ▪ 2025 (14.3)

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

Text

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

CMS

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

APA

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

BibTeX

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

BibLaTeX

@online{reference.wolfram_2025_histogram, organization={Wolfram Research}, title={Histogram}, year={2025}, url={https://reference.wolfram.com/language/ref/Histogram.html}, note=[Accessed: 04-February-2026]}

Top
Introduction for Programmers
Introductory Book
Wolfram Function Repository | Wolfram Data Repository | Wolfram Data Drop | Wolfram Language Products
Top
  • Products
  • Wolfram|One
  • Mathematica
  • Notebook Assistant + LLM Kit
  • 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