in reply to loops + creating graphs

Each time you produce a new graph, your writing it to the same file!


Examine what is said, not who speaks.
"Efficiency is intelligent laziness." -David Dunham
"When I'm working on a problem, I never think about beauty. I think only how to solve the problem. But when I have finished, if the solution is not beautiful, I know it is wrong." -Richard Buckminster Fuller


Replies are listed 'Best First'.
Re: Re: loops + creating graphs
by Anonymous Monk on May 28, 2003 at 16:24 UTC
    Do you know how I can get around this??

      Use different file names:)

      See Automatically creating incremental file names for recent discussion on this very problem.


      Examine what is said, not who speaks.
      "Efficiency is intelligent laziness." -David Dunham
      "When I'm working on a problem, I never think about beauty. I think only how to solve the problem. But when I have finished, if the solution is not beautiful, I know it is wrong." -Richard Buckminster Fuller


      i think what you want to do is create a temporary file; that way, you can store the plot data in it. and not have it overwritten.

      according to the cookbook, you could use tmpnam. there was a posting with that in the last couple of days (check "newest nodes"). i prefer File::Temp.

      something like
      use File::Temp; my $tfname = File::Temp::tempnam($tmpdir, "math.")
      will get you *the name* for a create a temporary file with the prefix "math". you'll have to write the stuff in the loop to it yourself.

      ...wufnik -- in the world of the mules there are no rules --