Contents Previous Next Subchapters

Creating Histograms
Syntax [yry] = tphist(xK)
[yry] = tphist(xKrelativeFrequencies)
See Also tpplot , tpput

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 tphist 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)
   tphist(r, 40);
Tecplot will create the following histogram plot for the normal distribution, r.


If you continue the example above by entering
   tpframe("Relative Frequencies")
   tphist(r, 30, true);
Tecplot will create a histogram plot for the relative frequencies