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


ShowHistogram

Declaration: TFrmPlots.ShowHistogram (DataRange: TDataRange; ColRow: integer; llx, lly, urx, ury: double; ShowNDistri: boolean; Caption: string): integer;
Sets the plot window into histogram mode and displays the histogram according to the parameters. The parameter DataRange specifies which part of the data container is used for the creation of the histogram. It may assume one of the following values:

hrColumn All data points of a single column (specified by ColRow) are fed into the construction of the histogram.
hrRow All data points of a single row (specified by ColRow) are fed into the construction of the histogram.
hrAll All data points of the entire data container are fed into the construction of the histogram.
hrMarkedData All marked data are fed into the construction of the histogram.

Depending on the DataRange value the parameter ColRow specifies either the column or the row which is used for calculating the histogram. If DataRange is set to hrAll or to hrMarkedData, ColRow is ignored.

The parameters llx, lly, urx, ury define the range of the axes. llx and lly define the lower left point of the diagram, urx and ury define the upper right point. Setting all four parameters to zero forces an automatic zoom so that the entire plot is visible.

The parameter ShowNDistri controls the visibility of the estimated normal distribution and Caption defines the caption to be displayed both in the chart and in the window ribbon.

The function returns the following error codes:

 0 ... everything is OK
-1 ... ColRow is out of range
-2 ... no marked data
-3 ... the x axis has zero range
-4 ... the y axis has zero range