in reply to Re: GD::Graph::points + multiple data sets
in thread GD::Graph::points + multiple data sets

you can do this for the x-axis but not the y-axis too as then you will have only one data-set! I have tried the following, but it seems to miss out some data-points (not sure why).
my @totalx_vals = (@x_vals1, @x_vals2); my @graph_data = (\@totalx_vals, \@y_vals1, \@y_vals2);

Replies are listed 'Best First'.
Re: Re: Re: GD::Graph::points + multiple data sets
by Melly (Chaplain) on Oct 08, 2003 at 15:00 UTC

    I'm confused - you did try the logical thing of doing this twice - once for the 2 sets of x-vals and once for the 2 sets of y-vals?

    I haven't yet used GD::Graph, but the syntax you gave seems to imply that

    my @graph_data = (\@x_vals, \@y_vals)
    is the expected format. So...
    @x_vals = (@x_vals1, @x_vals2); @y_vals = (@y_vals1, @y_vals2); my @graph_data = (\@x_vals, \@y_vals);

    If this isn't the solution, then you'll have to wait for someone who knows perl and/or GD::Graph better than me...

    Tom Melly, tom@tomandlu.co.uk
      thanks for your help - but i'm trying to impose to sets of data on the same graph (e.g. with different colours). This method just merges both data-sets into 1. Cheers