in reply to Re^4: build a distribution
in thread build a distribution
Grig:
Ah, I made a mistake in the subroutine. It was:
sub get_bin { # Determine the name of the bin to put the value into my $val = shift; my $bin_min = int($val / 10); my $bin_max = $bin_min + 10; return "$bin_min-$bin_max"; }
but it should have been (untested):
sub get_bin { # Determine the name of the bin to put the value into my $val = shift; my $bin_min = 10*int($val / 10); my $bin_max = $bin_min + 10; return "$bin_min-$bin_max"; }
I forgot the "10*" when computing $bin_min, so instead of 0, 10, 20, etc., it was using 0, 1, 2, ...
...roboticus
|
|---|