MATLAB: Plot 2d histogram in form of bin

histogram

I want to plot frequency of occurrence in form of chart like image given below. And i also want to define size of bins so range of data occurs in single bin.

Best Answer

Use the histogram2 function with 'DisplayStyle', 'tile' as shown in the "Tiled Histogram View" on the documentation page for histogram2.