Histogram

A somewhat more specialized class is
Histogram
and its support classes
HistogramApplet,
HistogramMLApplet, and
HistogramMLApplication.
The Histogram class is not just a plotter. It actually calculates
the histogram from raw data. Data can be provided by Java code
(by extending any of the support classes above), by a PlotML file,
or by an ASCII file in a simple format described below.
Here is an example of a histogram:

The above applet shows three histograms. The one in red is a histogram
of a cosine signal with amplitude 5.0, showing that fewer values lie in
the ranges in the middle than near the amplitude extremes.
Each bar is centered in the middle of a histogram bin.
The height of each bar represents the number of samples that lie
within that bin. The bar is not as wide as the bin so that multiple
histograms show at once.

In this syntax, the look and labeling of the plot is specified
exactly as with other plots. In fact, the syntax is readable
by the PlotMLParser class, so it is easy to plot the raw data
and the histogram from the same specification file.
Here is an example of a histogram that reads PlotML data from a URL: