DataLab is a compact statistics package aiming at exploratory data analysis. Please visit the DataLab Web site for more information....


Histogram

Declaration: TMatrix.Histogram (LoX, LoY, HiX, HiY: longint; FirstBin, LastBin, BinWidth: double; var Histo: TIntArray; var Underflow, Overflow, MaxCnt: longint): boolean;
The function Histogram calculates a histogram of the data in the matrix. The range of the included data is determined by the parameters LoX, LoY, HiX, and HiY. [LoX, LoY ] specify the upper left cell of the matrix, [HiX, HiY ] specify the lower right corner of the selected range.

The parameters FirstBin, and LastBin specify the left (lower) boundary of the first and the last histogram bin. The parameter BinWidths defines the width of the bins. A particular bin of the histogram spans the range from FirstBin + (i-1)*BinWidth to FirstBin + i*BinWidth, with i being the bin number (starting from one). The integer vector Histo contains the counts of the histogram. Histo is automatically resized to fit all histogram cells. Values which don't fit into the histogram (i.e. values which are less than FirstBin, or greater than LastBin +BinWidths ) are counted in the variable parameters UnderFlow and OverFlow. The variable parameter MaxCnt contains the maximum count over all histogram bins.

The function returns TRUE if it has been carried out successfully. If a FALSE value is returned, the parameter BinWidth was too small, therefore resulting in too many bins (maximum of 500).