File Exchange

image thumbnail

MATLAB Plot Gallery - Histogram Plot

version (29.1 KB) by MathWorks Plot Gallery Team
Create a histogram plot


Updated 19 Dec 2018

View Version History

View License

This is an example of how to create a histogram plot in MATLAB®.
Read about the "histogram" function in the MATLAB documentation. This function is available in R2014b or newer.

For more examples, go to MATLAB Plot Gallery -

Cite As

MathWorks Plot Gallery Team (2021). MATLAB Plot Gallery - Histogram Plot (, MATLAB Central File Exchange. Retrieved .

Comments and Ratings (19)

Guangbo Wang

u X

诺 许

Chaoya Ding

Kenneth Stover

Xing Zhou

云霞 罗

一鸣 牛

佳敏 陈

懿韬 丘

满谦 欧

Alisha Mahjabeen

Vedant Sharma

Tsung-Hsien Yang



Raghav Sarda

Kevin Chng

Hi, is any method to stack the histogram by the command "histogram", in the past, I did it as following ways:


Chad Greene

The new histogram function in R2014b seems to be decent, but if you're using a previous version of Matlab and you want a more intuitive way to format histograms, consider histf described here:

MATLAB Release Compatibility
Created with R2014b
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!