NAME
Statistics::Histogram - Create a standard histogram for command-line display
VERSION
version 0.1
SYNOPSIS
use Statistics::Histogram;
my @data = <>;
chomp @data;
print get_histogram(\@data);
DESCRIPTION
This module exports a single routine, get_histogram, which expects an array reference as its only required argument. The array should contain a sequence of numbers, and the response will be an ascii-formatted histogram, including some header lines providing statistics.
ATTRIBUTES
num_bins
$num_bins defaults to 10, and controls the maximum number of bins in the chart. Depending on the data, there may be fewer bins if there are fewer than $num_bins unique values.
use_linear_axes
$use_linear_axes defaults to false, which will create a chart with logarithmic axes. This is most useful for data derived from software timing metrics, which tend to be non-Normal and biased towards the axes.
METHODS
get_histogram
print get_histogram($array_ref);
print get_histogram($array_ref, $num_bins, $use_linear_axes);
There are two optional arguments: $num_bins and $use_linear_axes.
SEE ALSO
AUTHOR
Douglas Webb <doug.webb@gmail.com>
COPYRIGHT AND LICENSE
This software is copyright (c) 2005 by Douglas Webb.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.