#do Bargraph("discussd", @disscussd, 0, $maxentry, 1, 0, 20, 1);

# This subroutine does bar graphs....
# Usage is as follows:
#
# do Bargraph($title, @array, $x_min, $x_max, $x_step, 
#			      $y_min, $y_max, $y_step)

sub Bargraph {
	local ($title, @array, $x_min, $x_max, $x_step,
			       $y_min, $y_max, $y_step) = @_;
	local($x, $y);

	for ($y=$y_max; $y < $y_min; $y += $y_step) {
		for ($x=$x_min; $x < $x_max; $x += $x_step) {
			if ($array[$x] <= $y) {
				print " ";
			} else {
				print "#";
			}
		}
		printf(" %2d\n", $y);
	}
}
