Hi guys,
I do I use the perl module Chart::Graph::Gnuplot to plot selected columns.   e.g to plot column 1 and 2 and then plot 1 and 3 and have them appear on the same png graph

23/10/2003 0.26 1.18 65.42
23/10/2003 0.92 1.92 28.2
23/10/2003 2.12 1.23 21.4
23/10/2003 0.67 0.86 3.56

I can only achieve this by splitting the colums into differnt file then call chart graph.   Im sure there is a way I can graphing the selected columns without splitting the data.

This is how I can currently use it at the momment
#!/usr/bin/perl -w use Chart::Graph::Gnuplot qw(gnuplot); #Debugging aid - save the temporary files if desired #$Chart::Graph::save_tmpfiles = 1; #Debugging aid - turn on extra debugging messages #$Chart::Graph::debug = 1 # Call and "usual" global parameters gnuplot({"title" => "Bradford-A-router Bandwidth-1MB Util% In/Out", "x-axis label" => "Last 4 Weeks", "y-axis label" => "Utilization %", "output type" => "png", "output file" => "Bradford-A.png", # Setting date/time specific options. "xdata" => "time", "timefmt" => "%d/%m/%Y\t%H:%M", "format" => ["x", "%d/%m/%Y"], # Set output range - note quoting of date string "xrange" => "[\"07/11/2003\":\"04/12/2003\"]", "extra_opts" => join("\n", "set grid"), }, # Data for when stock opened [{"title" => "Bytes In", "style" => "lines", "type" => "file"}, "/root/bytes-in"], # Data for when stock opened [{"title" => "Bytes Out", "style" => "lines", "type" => "file"}, "/root/bytes-out"],);
regards,
gab

janitored by ybiC: Balanced <code> tags around example code as per Monastery convention, formatting tweaks for legibility


In reply to using Chart::Graph::Gnuplot by gabjones

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.