#!/usr/bin/env perl
use strict;
use warnings;
use SVG::Graph::Kit;
my $data = [ [ 1, 2, 0 ],
[ 2, 3, 1 ],
[ 3, 5, 1 ],
[ 4, 7, 2 ],
[ 5, 11, 3 ],
[ 6, 13, 5 ], ];
my $g = SVG::Graph::Kit->new(data => $data);
#print $g->draw;
my $n;
for my $dim (qw(x y z)) {
for my $stat (qw(min max mean mode median range stdv percentile)) {
$n = $stat eq 'percentile' ? 90 : undef; # Inspect the 90th percentile.
printf "%s %s = %0.2f\n", $dim, $stat, $g->stat($dim, $stat, $n);
}
}