Guys thank you for the input. The references were confusing me at first once I understood what kind of data is required and how to push it onto @data it made alot more sense.

use GD::Graph::lines; use GD::Graph::Map; use GD::Graph::Data; my ( @hyd,@aut,@fil,@cli,@mis,@days,@std,@files ); @data = (); @files = ( "work_days.dat","std.dat","hyd_daily.dat","aut_daily.dat"," +cli_daily.dat","mis_daily.dat"); sub split_file_line { my $file = shift; open IN, "<$file" || die "cannot open $file: $!"; my $temp = <IN>; my @items = ( split /,/,$temp ); close IN; return \@items; } foreach (@files) { push @data, split_file_line($_); } $my_graph = GD::Graph::lines->new(600,600); $my_graph->set( x_label => 'Working Days ', y_label => '% Percentage', title => 'Orders on Time ', y_max_value => 200, y_min_value => 0, y_tick_number => 20, y_label_skip => 1, box_axis => 0, line_width => 5 ); open PNG, ">p.png"; binmode PNG; #only for Windows like platforms print PNG $my_graph->plot(\@data)->png; close PNG; $map = new GD::Graph::Map($my_graph, info => '%l'); open HTML, ">p.html"; print HTML "<HTML><BODY BGCOLOR=white><CENTER>\n". ($map->imagemap("parker.png", $ref)). "</CENTER></BODY></HTML>"; close HTML; __END__


In reply to Re: Re: Graphing basics.. by Anonymous Monk
in thread Graphing basics.. by Anonymous Monk

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.