File Exchange

image thumbnail

MATLAB Plot Gallery - Histogram Plot

Create a histogram plot

8 Downloads

Updated 19 Dec 2018

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 - http://www.mathworks.com/discovery/gallery.html

Cite As

MathWorks Plot Gallery Team (2019). MATLAB Plot Gallery - Histogram Plot (https://www.mathworks.com/matlabcentral/fileexchange/35275-matlab-plot-gallery-histogram-plot), MATLAB Central File Exchange. Retrieved .

Comments and Ratings (2)

Kevin Chng

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

bar([case1;case2;case3],'stacked')

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: http://www.mathworks.com/matlabcentral/fileexchange/47552-histf/content//histf_documentation/html/histf_documentation.html

Updates

1.2.0.1

Added live script

1.2.0.0

Updated description

1.1.0.1

Updated license

1.1.0.0

Updated screenshot.

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

Discover Live Editor

Create scripts with code, output, and formatted text in a single executable document.


Learn About Live Editor