in reply to Re^2: Issues graphing multiple data sets on the same graph in GD::Graph
in thread Issues graphing multiple data sets on the same graph in GD::Graph

Well, I'm not sure exactly what your code has to do, but the Array of Array doesn't have to be static. You can push an array onto the AoA. Something like
@users = ( [userexample[0]], [userexample[1]], [userexample[2]], ); @userexample[3] = (1,2,3,4); push @users, \@userexample[3]; # now # @users = ( # [userexample[0]], # [userexample[1]], # [userexample[2]], # [userexample[3]], # );
So, you can store the current values, like in a db, push on new arrays, and rebuild the graph.

Read "perldoc perldsc" for a better explanation of all the possible Perl data structures. There are all sorts of data structures.... HoH, AoA,HoA,AoH,...etc., etc, etc.


I'm not really a human, but I play one on earth. Cogito ergo sum a bum
  • Comment on Re^3: Issues graphing multiple data sets on the same graph in GD::Graph
  • Download Code

Replies are listed 'Best First'.
Re^4: Issues graphing multiple data sets on the same graph in GD::Graph
by SoaponaRope (Novice) on Nov 12, 2007 at 21:00 UTC
    The example code you posted unfortunately returns a syntax error when I attempt to compile it. I've read the perldsc page, but the examples on there are still somewhat vague to me, and I don't see anything that seems to imply the syntax I'm looking for.

    Sorry if I seem anxious: I've been working on this project for three weeks now, and this is literally the last bug that needs to be ironed out before we roll it into production. (It's also the first real program I've ever written in any language) I'm ready for it to be on the way.

    Edit: The syntax error that was returned was the result of a typo error on my part. Unfortunately, it also doesn't seem to be doing what I'm trying to do. This operator seems to add the numbers together in each arry, the numbers resulting are impossibly high. :(