in reply to Stumped by Chart::Graph::Gnuplot parameters

You're passing a reference to the data_sets array when the POD is saying that it needs an array. Try calling it with only "@data_sets" as opposed to "\@data_sets".
  • Comment on Re: Stumped by Chart::Graph::Gnuplot parameters

Replies are listed 'Best First'.
Re: Re: Stumped by Chart::Graph::Gnuplot parameters
by qi (Initiate) on Mar 05, 2001 at 19:38 UTC
    To be clear, the final solution is:
    while($logfile = shift) { push @data_sets, [{"type" => "file"}, $logfile]; } gnuplot({"title" => "foo"}, @data_sets);

      the final solution is

      Heh!

      gnuplot( {title=>"foo"}, map {[{type=>"file"},$_]} @ARGV );
              - tye (but my friends call me "Tye")
Re: Re: Stumped by Chart::Graph::Gnuplot parameters
by qi (Initiate) on Mar 05, 2001 at 19:36 UTC
    Hmph, I remember trying that and it didn't work "Data set must be an array...", but, if I replace the round brackets with square brackets on the push line, it works!

    To be honest, I'm sure that's what I tried originally... well, it always ends up in tears when I randomly insert \s and [s until something works.

    Thanks a lot.