Chart::Math::Axis

Implements an algorithm to find good values for chart axis
Download

Chart::Math::Axis Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Publisher Name:
  • Adam Kennedy
  • Publisher web site:
  • http://search.cpan.org/~adamk/

Chart::Math::Axis Tags


Chart::Math::Axis Description

Implements an algorithm to find good values for chart axis Chart::Math::Axis is a Perl module that implements in a generic way an algorithm for finding a set of ideal values for an axis. That is, for any given set of data, what should the top and bottom of the axis scale be, and what should the interval between the ticks be.The terms top and bottom are used throughout this module, as it's primary use is for determining the Y axis. For calculating the X axis, you should think of 'top' as 'right', and 'bottom' as 'left'.SYNOPSIS # Create a new Axis my $Axis = Chart::Math::Axis->new(); # Provide is some data to calculate on $Axis->add_data( @dataset ); # Get the values for the axis print "Top of axis: " . $Axis->top . "\n"; print "Bottom of axis: " . $Axis->bottom . "\n"; print "Tick interval: " . $Axis->interval_size . "\n"; print "Number of ticks: " . $Axis->ticks . "\n"; # Apply the axis directly to a GD::Graph. $Axis->apply_to( $Graph ); Requirements: · Perl


Chart::Math::Axis Related Software