Next: , Previous: , Up: Internal Routines   [Contents][Index]


15.5.311 hist

hist(x [, l] [, /first, /ignorelimit, /increaselimit, /silent])

Returns the histogram (binsize 1) of x. If l is not specified, then the histogram runs between values !histmin (zero or negative) and !histmax, and cannot exceed !maxhistsize bins, unless /ignorelimit or /increaselimit are specified. /ignorelimit causes the limit to be ignored, so that histograms of arbitrary (possibly very large!) size are allowed. /increaselimit increases the value of !maxhistsize if necessary to accomodate the current histogram. If /first is specified and x is multidimensional, then histograms along the first dimension are returned. By default, a single histogram of the whole array is returned.

By default, a warning is issued if x contains negative values (so that the first element of the histogram does not refer to value 0 from x but to the most negative value). If /silent is specified, then the warning is suppressed.

If l is specified, then in it a list of unique values in x is returned, in ascending order, and the return value of the function is the corresponding frequency table. In this case, the keywords are ignored, and there is no specific limit on the size of the histogram. This form of the function is useful if one expects that the histogram is large yet sparsely occupied.

See also: histr, distr, !histmin, !histmax, !maxhistsize