in reply to Re^3: Histogram in Perl
in thread Histogram in Perl

Thank You very much. I still get the errors. I rechecked my data and the data is perfect. my data are large double numbers , say 1.09005965871078 0.585952618303551 0.759547391474863 0.585952618303551 0.759547391474863 0.585952618303551 0.585952618303551 so i tried the test program with similar data & i was not able to prod +uce the graph. So could the error be cause of the data? the error is : Useless use of a constant in void context at /usr/lib/perl5/site_perl/ +5.8.0/GD/Graph/histogram.pm line 203. Use of uninitialized value in string eq at /usr/lib/perl5/site_perl/5. +8.0/GD/Graph/histogram.pm line 42. Argument "" isn't numeric in numeric eq (==) at /usr/lib/perl5/site_pe +rl/5.8.0/GD/Graph/histogram.pm line 181. Use of uninitialized value in string eq at /usr/lib/perl5/site_perl/5. +8.0/GD/Graph/histogram.pm line 42. Use of uninitialized value in string eq at /usr/lib/perl5/site_perl/5. +8.0/GD/Graph/histogram.pm line 42.

Replies are listed 'Best First'.
Re^5: Histogram in Perl
by Jaya (Acolyte) on Feb 18, 2005 at 07:13 UTC
    I figured it out!! its the data. just multiply the data by some decimal number say foreach $i (@data){ $i = $i *1000; } get the distinct values and proceed to the histogram. The bins seem to + work for only integers.(I am still a novice , please correct me if i + am wrong). So if anyone has decimal numbers and need to plot histogram. just scal +e it!!! Thanks a lot for the all help! This site is very helpful. I am learnin +g a lot