AUTOHIST
Name
AUTOHIST
Purpose
Draw a histogram using automatic bin-sizing.
Explanation
AUTOHIST chooses a number of bins (initially, SQRT(2*N). If this leads
to a histogram in which > 1/5 of the central 50% of the bins are empty,
it decreases the number of bins and tries again. The minimum # bins is
5. The max=199. Called by HISTOGAUSS and HALFAGAUSS.
Calling Sequence
AUTOHIST, Sample, XLines, Ylines, XCenters, YCenters, [/NOPLOT, ]
...Plotting Keywords
Input
Sample = the vector to be histogrammed
Output
XLINES = vector of x coordinates of the points that trace the rectangular
histogram bins
YLINES = vector of y coordinates. To draw the histogram plot YLINES vs
XLINES
XCENTERS = the x values of the bin centers
YCENTERS = the corresponding y values
Optional Input Keywords
/NOPLOT If set, nothing is drawn
Any plotting keywords (e.g. XTITLE) may be supplied to AUTOHIST through
the _EXTRA facility.
Revision History
Written, H. Freudenreich, STX, 1/91
1998 March 17 - Changed shading of histogram. RSH, RSTX
V5.0 update, _EXTRA keywords W. Landsman April 2002
Added NOCLIP keyword for POLYFILL call C. Paxson/W. Landsman July 2003
Use Coyote graphics W. Landsman Feb 2011