Subject: | GD::Graph::lines dies when y-axis values = "0.0" |
GD::Graph::lines dies when y-axis values = "0.0". I have an array and every y-axis value is "0.0". It works when it is not "0.0" such as "0.1".
Code:
#!/usr/bin/perl
use CGI;
use GD;
use GD::Graph::lines;
my @data = ( ["Sun", "Mon"],
[ "0.0","0.0" ]); # This doesn't work
# [ "2.0","0.0" ]); # This works
my $graph = new GD::Graph::lines(800,350);
my $format = $graph->export_format;
print CGI::header("image/$format"); # from use CGI?
binmode STDOUT;
print $graph->plot(\@data)->$format() or die $graph->error;
Graph Version:
# $Id: Graph.pm,v 1.53 2003/07/01 04:56:57 mgjv Exp $
# $Id: lines.pm,v 1.15 2003/02/10 22:12:41 mgjv Exp $
$ perl -V
Summary of my perl5 (revision 5.0 version 6 subversion 0) configuration:
Platform:
osname=aix, osvers=5.0.0.0, archname=aix
uname='aix shaq 1 5 006044854c00 '
config_args='-de'
hint=recommended, useposix=true, d_sigaction=define
usethreads=undef use5005threads=undef useithreads=undef usemultiplicity=undef
useperlio=undef d_sfio=undef uselargefiles=define
use64bitint=undef use64bitall=undef uselongdouble=undef usesocks=undef
Compiler:
cc='cc', optimize='-O', gccversion=
cppflags='-D_ALL_SOURCE -D_ANSI_C_SOURCE -D_POSIX_SOURCE -qmaxmem=16384'
ccflags ='-D_ALL_SOURCE -D_ANSI_C_SOURCE -D_POSIX_SOURCE -qmaxmem=16384 -q32
-D_LARGE_FILES -qlonglong'
stdchar='unsigned char', d_stdstdio=define, usevfork=false
intsize=4, longsize=4, ptrsize=4, doublesize=8
d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=8
ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
alignbytes=8, usemymalloc=n, prototype=define
Linker and Libraries:
ld='ld', ldflags ='-b32'
libpth=/lib /usr/lib /usr/ccs/lib
libs=-lbind -lnsl -lgdbm -ldbm -ldb -ldl -lld -lm -lC -lC_r -lc -lcrypt -lbsd
-lPW -liconv
libc=/lib/libc.a, so=a, useshrplib=false, libperl=libperl.a
Dynamic Linking:
dlsrc=dl_aix.xs, dlext=so, d_dlsymun=undef, ccdlflags='
-bE:/usr/opt/perl5/lib/5.6.0/aix/CORE/perl.exp'
cccdlflags=' ', lddlflags='-bhalt:4 -bM:SRE -bI:$(PERL_INC)/perl.exp
-bE:$(BASEEXT).exp -b noentry -lC -lc '
Characteristics of this binary (from libperl):
Compile-time options: USE_LARGE_FILES
Built under aix
Compiled at Nov 22 2000 08:49:49
@INC:
/usr/opt/perl5/lib/5.6.0/aix
/usr/opt/perl5/lib/5.6.0
/usr/opt/perl5/lib/site_perl/5.6.0/aix
/usr/opt/perl5/lib/site_perl/5.6.0
/usr/opt/perl5/lib/site_perl
.
Comment: I will find a work around in my program for this, so I will not need the fix, but someone else may need it. If this has already been corrected on newer versions. I apologize. Thanks. J.J. Engel