v has asked for the wisdom of the Perl Monks concerning the following question:

quick, painless question:

using GIFgraph, i want to set the length and width of the graph. however, the following does not work:

$my_graph = new GIFgraph::linespoints( [600, 400] );

nor does:

$my_graph = GIFgraph::linespoints::new( [600, 400] );

i receive:

Usage: GIFgraph::<type>::new( [x_size, y_size] )with the former invocation and Undefined subroutine with the latter. tia.

-v

Replies are listed 'Best First'.
Re: GIFgraph
by I0 (Priest) on Dec 15, 2000 at 22:43 UTC
    use GD::Graph::lines; $graph = GD::Graph::lines->new(600, 400);
      sorry, i forgot to mention that i'm using perl5.04.

      GD::Graph isn't happy unless on 5.04, and i'm stuck w/ this version of perl.

        From the documentation for GIFgraph 1.20:
        GIFgraph is nothing more than a wrapper around GD::Graph.
        Unfortunately, I don't see anything else more applicable on the CPAN.
        duh...GD::Graph isn't happy on 5.04, not the other way around.
      ok, i figured it out. simple syntax error, but i wish that the Perl Module Reference book wouldn't throw me off with incorrect syntax.

      $mygraph = new GIFgraph::bars(800, 450);

      i should have tried this after IO's response.