Increase 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)
h = Histogram with properties: Data: [1000x1 double] Values: [3 1 2 15 17 27 53 79 85 101 127 110 124 95 67 32 27 ... ] NumBins: 23 BinEdges: [-3.3000 -3.0000 -2.7000 -2.4000 -2.1000 -1.8000 ... ] BinWidth: 0.3000 BinLimits: [-3.3000 3.6000] Normalization: 'count' FaceColor: 'auto' EdgeColor: [0 0 0] Show all properties
morebins to increase the number of bins in the histogram.
ans = 29
direction— Direction to increase number of bins
Direction to increase the number of bins, specified as
'y' to only increase the number of bins in that
direction while leaving the number of bins in the other direction
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,