Bar graph

This is a class for creating bar graphs. It draw bars whose lengths are proportional to a small set of data values and hence visually display and compare the data values.

The class is called histogram. To create a memeber of this class

h = histogram.new(xlabels, yvalues, grouplabels);
where xlabels is the labels displayed on the horizontal axis used to identify each value. yvalues are the values to be compared. grouplabels is the labels used to identify each group of data. It can be left out if there's only one group.

hist = histogram.new(("a", "b", "c"), ((0.6, 0.25, 0.15), (0.7, 0.32, 0.27), ...
                     (0.9, 0.2, 0.5)), ("Ocean", "Lake", "Pond"));
hist.save("hist.eps");
Image hist



oz 2009-12-22