Histogram

<series> output = <series>.hist()

<series> output = <series>.hist(<bool> Remove Outliers)

<series> output = <series>.hist(<number> Number of Bins)

<series> output = <series>.hist(<number> Number of Bins, <bool> Remove Outliers)

<series> output = <series>.hist(<array> Bins)

<series> output = <series>.hist(<array> Bins, <bool> Remove Outliers)

This function can be called in a variety of manners.  Called with no arguments, the histogram function will automatically determine the number of bins to create which result in the largest bin containing no more than 20% of the data samples.  This function call returns an array of bin values.  Each value represents the number of data points that fell into that bin. The XStart value and the Fs value are adjusted so that the data points are displayed at the center of the bin range on the x-axis. A variation on this call is to pass in the bool Remove Outliers, which if set will remove any data points that are deemed to be an outlier (more than two standard deviations away from the average).

This function can also take a number of bins as the input Number of Bins.  The function creates this number of bins evenly distributed across the range of the data and then performs in the same manner as the first call.  Remove Outliers can also be specified if desired.

This function can also take an array of bins as the input Bins.  This array will be interpreted as bin ranges.  For example the array: 1, 5, 10, 14, 19 would produce 6 bins: min-1, 1-5, 5-10, 10-14, 14-19, 19-max.  Two series are returned from this call.  The first is the series representing the bin values, and the second is a series representing the bin ranges that the user specified.  Remove Outliers can also be specified if desired.

Default value for Remove Outliers if it is not specified is false.

Examples:

var myBins = mySeries.hist();

var myBins = mySeries.hist(true);

var myBins = mySeries.hist(50, true);

var myBinArray = new Array(1, 5, 10, 14, 19);

var myBins = mySeries.hist(myBinArray, true);