Monks, I'm a bit rusty with Perl, I took a hiatus to learn TCL. I'm having an issue with Chart::Graph::Gnuplot, today. Using the General Example from CPAN, I always seem to return an error message, I'm fairly certain that I'm passing the data set as an array, though I may be smoking the crack.. Error:
Data set must be an array at gnuplot.cgi line 9
General Example
use Chart::Graph::Gnuplot qw(gnuplot); gnuplot({"title" => "foo", "x2-axis label" => "bar", "logscale x2" => "1", "logscale y" => "1", "output type" => "png", "output file" => "gnuplot1.png", "xtics" => [ ["small\\nfoo", 10], ["medium\\nfoo", 20], ["l +arge\\nfoo", 30] ], "ytics" => [10,20,30,40,50]}, "xdata" => "time", "format" => ["x", "%m/%d"], "timefmt"=> $date_format, "extra_opts" => "set key left top Left", [{"title" => "data1", "type" => "matrix"}, [[1, 10], [2, 20], [3, 30]] ], [{"title" => "data2", "style" => "lines", "type" => "columns"}, [8, 26, 50, 60, 70], [5, 28, 50, 60, 70] ], [{"title" => "data3", "style" => "lines", "type" => "file"}, "samplefile"],);
Any help is apreciated!

--
paul


In reply to Chart::Graph::Gnuplot Array Issue by vbrtrmn

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.