%% Decrease Number of Histogram Bins
% Plot a histogram of 1,000 random numbers and return a handle to the histogram object.

x = randn(1000,1);
h = histogram(x)

%
% Use fewerbins to decrease the number of bins in the histogram.

fewerbins(h);
fewerbins(h)

% Copyright 2015 The MathWorks, Inc.