CHistogram:new CHistogram:SetBinCount

CHistogram:SetBinAuto


The SetBinAuto method configures the histogram binning strategy to compute the number of bins and bin width automatically. After calling this method, Mira sets the bin count to be the lesser of the square root of the number of sample points or 100. The minimum and maximum data values are used as the hiostogram limits. Using these values, the bin width is computed to fit the number of bins into the data range.

Syntax

CHistogram:SetBinAuto()

Remarks

If you do not call one of the SetBin methods, Mira defaults to this binning option. Normally, this method produces a nice default histogram. However, if the number of points is relatively small and the data values all have integer values, the auto setting can cause aliasing, in which a cell boundary falls on a real number between integer values. Aliasing produces a comb-like appearance with alternatiing cells going higher and lower. If the data all have integer values and you suspect aliasing, try using the SetBinWidth method with an integer value for the bin width.

Related Topics

CHistogram Class, SetBinCount, SetBinWidth