in reply to Having problem graphing with Perl GD module

If you added use strict & use warnings to your code, you'd find about a dozen reasons why what you've posted doesn't work.

These include

  1. An unclosed if statement.
  2. Assigning to $data and passing \@data.
  3. Where does GD::Graph::Data come from? I can't find it on CPAN (and it surely isn't needed for what you are doing).

If you cleaned up the obvious things in your code, you'd get a lot closer to being able to solve your own problem.


Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
"I'd rather go naked than blow up my ass"

Replies are listed 'Best First'.
Re^2: Having problem graphing with Perl GD module
by rakheek (Sexton) on Mar 13, 2010 at 00:01 UTC
    Thank you BrowserUk. Actually, #2 was the problem. I got around with following code. Also, I got rid of GD::Graph::Data. My if is closed. BTW, I am new to perlmonks and am very happy to see quick response on the site.
    my @data = (\@log_date, \@deimos_open_bugs); my $myimage = $mygraph->plot(\@data) or die $mygraph->error;
Re^2: Having problem graphing with Perl GD module
by Mr. Muskrat (Canon) on Mar 15, 2010 at 17:17 UTC

      Oh dear. New maintainer, new fluff. At least it's optional.


      Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
      "Science is about questioning the status quo. Questioning authority".
      In the absence of evidence, opinion is indistinguishable from prejudice.

        It was there in 1.40 (earliest still on CPAN, 29 May 2003). I seem to remember using it in 2001 or 2002 as well but I'm too lazy to look it up in BackPAN.