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
ImageHistogram
  • See Also
    • ImageLevels
    • ChromaticityPlot
    • ImageWaveformPlot
    • ImageVectorscopePlot
    • ImageAdjust
    • ImageData
    • Histogram
    • HistogramTransform
  • Related Guides
    • Image Representation
    • Color Processing
    • Image Processing & Analysis
    • 3D Images
    • Image Computation for Microscopy
    • Computational Photography
    • Image Computation: Update History
  • Tech Notes
    • Image Processing
    • See Also
      • ImageLevels
      • ChromaticityPlot
      • ImageWaveformPlot
      • ImageVectorscopePlot
      • ImageAdjust
      • ImageData
      • Histogram
      • HistogramTransform
    • Related Guides
      • Image Representation
      • Color Processing
      • Image Processing & Analysis
      • 3D Images
      • Image Computation for Microscopy
      • Computational Photography
      • Image Computation: Update History
    • Tech Notes
      • Image Processing

ImageHistogram[image]

plots a histogram of the pixel levels for each channel in image.

ImageHistogram[image,bspec]

uses bin specification bspec.

ImageHistogram[image,bspec,range]

plots the histogram of the pixel values in the given range.

Details and Options
Details and Options Details and Options
Examples  
Basic Examples  
Scope  
Options  
Appearance  
AspectRatio  
Axes  
Show More Show More
AxesLabel  
AxesOrigin  
AxesStyle  
Frame  
FrameLabel  
FrameStyle  
FrameTicks  
FrameTicksStyle  
ImageSize  
InterpolationOrder  
Joined  
Method  
PlotLegends  
PlotRange  
PlotTheme  
Ticks  
TicksStyle  
Applications  
Properties & Relations  
Possible Issues  
Interactive Examples  
Neat Examples  
See Also
Tech Notes
Related Guides
History
Cite this Page
BUILT-IN SYMBOL
  • See Also
    • ImageLevels
    • ChromaticityPlot
    • ImageWaveformPlot
    • ImageVectorscopePlot
    • ImageAdjust
    • ImageData
    • Histogram
    • HistogramTransform
  • Related Guides
    • Image Representation
    • Color Processing
    • Image Processing & Analysis
    • 3D Images
    • Image Computation for Microscopy
    • Computational Photography
    • Image Computation: Update History
  • Tech Notes
    • Image Processing
    • See Also
      • ImageLevels
      • ChromaticityPlot
      • ImageWaveformPlot
      • ImageVectorscopePlot
      • ImageAdjust
      • ImageData
      • Histogram
      • HistogramTransform
    • Related Guides
      • Image Representation
      • Color Processing
      • Image Processing & Analysis
      • 3D Images
      • Image Computation for Microscopy
      • Computational Photography
      • Image Computation: Update History
    • Tech Notes
      • Image Processing

ImageHistogram

ImageHistogram[image]

plots a histogram of the pixel levels for each channel in image.

ImageHistogram[image,bspec]

uses bin specification bspec.

ImageHistogram[image,bspec,range]

plots the histogram of the pixel values in the given range.

Details and Options

  • An image histogram is a graphical representation of the color distribution in an image.
  • ImageHistogram works with arbitrary grayscale and multichannel 2D and 3D images.
  • For RGB images, ImageHistogram by default displays the channels using red, green, and blue.
  • Binning specification bspec can be any of the following:
  • nn equally spaced bins
    Automaticautomatic choice of binning
    Allreturn tally of all available pixel values
    "Byte"256 levels after converting data values to a "Byte" type
  • By default, for binary images two bins are used; otherwise, 128 bins are used.
  • The range can be of the following forms:
  • Automaticautomatic ranges depending on the color space
    Allinclude all values
    {All,max}include values below max
    {min,All}include values above min
    {min,max}include values between min and max
  • The following defaults are used for range depending on the image color space. The ranges are chosen to include the subspace of the "RGB" color space.
  • "Grayscale","RGB","CMYK","HSB"{0,1}
    "XYZ"{0,1}
    "LAB"{-1.13,1}
    "LCH"{0,1.3}
    "LUV"{-1.26,1.76}
  • ImageHistogram accepts options of ListPlot, with the following additions and changes: [List of all options]
  • Appearance Automaticdetailed appearance of the histogram
    AspectRatio 1/3ratio of height to width
    Axes Falsewhether to draw axes
    FillingAxishow to fill in stems for each point
    Frame Truewhether to include a frame
    FrameTicks Noneframe ticks
    InterpolationOrder 0the polynomial degree of curves used in joining data points
    Joined Truewhether to join bars
    Method "IncludeOutOfRange"method to use
    PlotRangePaddingNonehow much to pad the range of values
  • Possible settings for Appearance are:
  • "RGB"show RGB channel values and overlapping colors
    "Separated"make separate histograms for each channel
    "Stacked"stack values for each channel
    "Transparent"show channels overlapping, using transparency
  • Possible settings for Method include:
  • "IncludeOutOfRange"values below range in first bin and values above range in last bin
    "ExcludeOutOfRange"do not count out-of-range values
  • List of all options

    • AlignmentPointCenterthe default point in the graphic to align with
      AppearanceAutomaticdetailed appearance of the histogram
      AspectRatio1/3ratio 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
      BaselinePositionAutomatichow to align with a surrounding text baseline
      BaseStyle{}base style specifications for the graphic
      ContentSelectableAutomaticwhether to allow contents to be selected
      CoordinatesToolOptionsAutomaticdetailed behavior of the coordinates tool
      DataRangeAutomaticthe range of x values to assume for data
      Epilog{}primitives rendered after the main plot
      FillingAxishow to fill in stems for each point
      FillingStyleAutomaticstyle to use for filling
      FormatTypeTraditionalFormthe default format type for text
      FrameTruewhether to include a frame
      FrameLabelNoneframe labels
      FrameStyle{}style specifications for the frame
      FrameTicksNoneframe 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
      InterpolationOrder0the polynomial degree of curves used in joining data points
      IntervalMarkersAutomatichow to render uncertainty
      IntervalMarkersStyleAutomaticstyle for uncertainty elements
      JoinedTruewhether to join bars
      LabelingFunctionAutomatichow to label points
      LabelingSizeAutomaticmaximum size of callouts and labels
      LabelStyle{}style specifications for labels
      Method"IncludeOutOfRange"method to use
      MultiaxisArrangementNonehow to arrange multiple axes for data
      PerformanceGoal$PerformanceGoalaspects of performance to try to optimize
      PlotHighlightingAutomatichighlighting effect for curves
      PlotLabelNoneoverall label for the plot
      PlotLabelsNonelabels for data
      PlotLayout"Overlaid"how to position data
      PlotLegendsNonelegends for data
      PlotMarkersNonemarkers to use to indicate each point
      PlotRangeAutomaticrange of values to include
      PlotRangeClippingTruewhether to clip at the plot range
      PlotRangePaddingNonehow much to pad the range of values
      PlotRegionAutomaticthe final display region to be filled
      PlotStyleAutomaticgraphics directives to determine styles of points
      PlotTheme$PlotThemeoverall theme for the plot
      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 plot
      TicksAutomaticaxes ticks
      TicksStyle{}style specifications for axes ticks

Examples

open all close all

Basic Examples  (3)

Histogram of an RGB image:

Histogram of a grayscale image:

Histogram of a 3D volume:

Scope  (6)

Specify the number of levels:

Histogram of a grayscale image showing all distinct levels:

Use range specification All to plot the histogram from the minimum to maximum value in the image:

Histogram of a binary image:

Use a range specification that includes negative values for plotting the histogram:

Histogram of a CMYK image:

Options  (70)

Appearance  (2)

Use additive colors to represent overlapping regions of histograms of an RGB image:

Show separate histograms for each color channel:

Stack the color channels vertically:

For non-RGB images, default plotting colors are used for all appearances:

Transparent histogram of a Lab image:

Stacked histogram:

Separated histogram:

AspectRatio  (3)

By default, the function 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, ImageHistogram uses a frame instead of axes:

Use axes instead of a frame:

Use AxesOrigin to specify where the axes intersect:

Turn each axis on individually:

AxesLabel  (3)

No axes labels are drawn by default:

Place a label on the axis:

Specify axes 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:

Frame  (5)

ImageHistogram uses a frame by default:

Use FrameFalse to turn off the frame:

Draw a frame on the left and right edges:

Draw a frame on the left and bottom edges:

Turn off the frame and use axes instead:

FrameLabel  (4)

Place a label along the bottom frame of a plot:

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

Place labels on each of the edges in the frame:

Use a customized style for both labels and frame tick labels:

FrameStyle  (2)

Specify the style of the frame:

Specify the style for each frame edge:

FrameTicks  (8)

Frame ticks are placed automatically by default:

Use a frame with no ticks:

Use frame ticks on the bottom edge:

Use All to include tick labels on all edges:

Place tick marks at specific positions:

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

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

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

Specify a style for each frame tick:

FrameTicksStyle  (3)

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

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

Use different styles for the different frame edges:

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:

InterpolationOrder  (2)

By default, the histogram is plotted with interpolation of order :

Create a smooth histogram of an image:

Joined  (1)

Render histogram using a stem plot:

Use a disjoint histogram:

Method  (1)

Control how pixels outside of the histogram range are counted and displayed:

PlotLegends  (4)

By default, no legend is shown:

Show legends for each plot:

Specify custom legends:

Using Appearance"RGB", there are seven segments and therefore legends to show:

PlotRange  (1)

Use PlotRange->Automatic for automatically determining the plot range:

PlotRange->All includes the entire histogram:

Modify the plot range to better visualize the distribution of higher intensities:

PlotTheme  (3)

Use a theme minimum styling:

Add horizontal grid lines to the plot:

Use a theme with dark background in a high-contrast color scheme:

Ticks  (7)

Ticks are placed automatically in each chart:

Use TicksNone to draw axes without any tick marks:

Specify tick spacings:

Place tick marks at specific positions:

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

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

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

Specify a style for each tick:

TicksStyle  (4)

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

Specify an overall ticks style, including the tick labels:

Specify ticks style for each of the axes:

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

Applications  (1)

Use the image histograms to estimate a suitable threshold:

Select threshold value using visual inspection of histograms:

Binarize image using selected threshold:

Properties & Relations  (3)

Image histogram can also be computed using Histogram; however, it is slower:

Find the histogram distribution of an image:

ImageHistogram blends alpha channel with black:

Blend with black before computing the histogram:

Blend with white:

Drop the alpha channel:

Possible Issues  (1)

Histograms with varying bin widths cannot be displayed using the "Stacked" appearance:

Use a different appearance:

Interactive Examples  (1)

Interactive histogram of an RGB image:

Neat Examples  (1)

Histogram of an image that is made progressively darker:

See Also

ImageLevels  ChromaticityPlot  ImageWaveformPlot  ImageVectorscopePlot  ImageAdjust  ImageData  Histogram  HistogramTransform

Tech Notes

    ▪
  • Image Processing

Related Guides

    ▪
  • Image Representation
  • ▪
  • Color Processing
  • ▪
  • Image Processing & Analysis
  • ▪
  • 3D Images
  • ▪
  • Image Computation for Microscopy
  • ▪
  • Computational Photography
  • ▪
  • Image Computation: Update History

History

Introduced in 2008 (7.0) | Updated in 2012 (9.0) ▪ 2014 (10.0)

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

Text

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

CMS

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

APA

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

BibTeX

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

BibLaTeX

@online{reference.wolfram_2025_imagehistogram, organization={Wolfram Research}, title={ImageHistogram}, year={2014}, url={https://reference.wolfram.com/language/ref/ImageHistogram.html}, note=[Accessed: 01-March-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