Content Prev Next Down

Creating Histograms
Syntax [yry] = shist(xK)
[yry] = shist(xKrelativeFrequencies)
See Also sbar , splot , spquit

Description
Create a histogram plot of the data in the numeric vector, x. The argument K specifies the number of bins to be used. If the value of K is 0, then the shist function will determine the bin count automatically. If present, the argument relativeFrequencies, must equal true, and specifies that relative frequencies should be plotted.

The returned value y is the calculated frequency vector, and the returned argument ry is the relative frequency vector.

Examples
If at the O-Matrix prompt you enter,
   r = snormal(128000,1)
   shist(r, 40);
SigmaPlot will create a histogram plot for the normal distribution, r.

If you continue the example above by entering
   shist(r, 30, true);
SigmaPlot will create a histogram plot for the relative frequencies and your notebook will no look like: