GDGraph
view release on metacpan or search on metacpan
Graph/axestype.pm view on Meta::CPAN
return $self->_set_error("Maximum for y" . $i . " too small")
if $self->{y_max}[$self->{use_axis}[$i-1]] < $max;
}
}
return $self;
}
# CONTRIB Scott Prahl
#
# Calculate best endpoints and number of intervals for an axis and
# returns ($nice_min, $nice_max, $n), where $n is the number of
# intervals and
#
# $nice_min <= $min < $max <= $nice_max
#
# Usage:
# ($nmin,$nmax,$nint) = _best_ends(247, 508);
# ($nmin,$nmax) = _best_ends(247, 508, 5);
# use 5 intervals
# ($nmin,$nmax,$nint) = _best_ends(247, 508, [4..7]);
Graph/axestype.pm view on Meta::CPAN
$best_max = $nice_max;
$best_fit = $fit;
$best_num = $n;
}
}
return ($best_min, $best_max, $best_num)
}
# CONTRIB Ben Tilly
#
# Calculate best endpoints and number of intervals for a pair of axes
# where it is trying to line up the scale of the two intervals. It
# returns ($nice_min_1, $nice_max_1, $nice_min_2, $nice_max_2, $n),
# where $n is the number of intervals and
#
# $nice_min_1 <= $min_1 < $max_1 <= $nice_max_1
# $nice_min_2 <= $min_2 < $max_2 <= $nice_max_2
#
# and 0 will appear at the same point on both axes.
#
# Usage:
( run in 0.841 second using v1.01-cache-2.11-cpan-2b1a40005be )