Decrease number of histogram bins
N = fewerbins(h)
N = fewerbins(h,direction)
Plot a histogram of 1,000 random numbers and return a handle to the histogram object.
x = randn(1000,1); h = histogram(x)
h = Histogram with properties: Data: [1000x1 double] Values: [1x23 double] NumBins: 23 BinEdges: [1x24 double] BinWidth: 0.3000 BinLimits: [-3.3000 3.6000] Normalization: 'count' FaceColor: 'auto' EdgeColor: [0 0 0] Show all properties
fewerbins to decrease the number of bins in the histogram.
ans = 18
direction— Direction to decrease number of bins
Direction to decrease the number of bins, specified as
only decrease the number of bins in that direction while leaving the
number of bins in the other direction constant.
N— Number of bins
Number of bins, returned as a scalar or vector.
the new number of bins for the histogram after increase. For bivariate
N is a two-element vector,