<DIV>ed,</DIV>
<DIV> </DIV>
<DIV>sure. it's pretty simple. the data that i am importing from tempfile is the output of "uptime", 41,000 times.</DIV>
<DIV> </DIV>
<DIV>matt</DIV>
<DIV> </DIV>
<DIV>#!/usr/bin/perl -w</DIV>
<DIV>use GD::Graph::bars;<BR>use GD::Graph::colour;</DIV>
<DIV>open (IN,"tempfile");<BR>while (<IN>) {<BR> $_ =~ /load average: (.*?),/;<BR> $data = $1;<BR> push (@undefineme, "");<BR> push (@final, $data);<BR>}</DIV>
<DIV>@data = ( <BR> [@undefineme],<BR> [@final],<BR>);<BR>#y axis is top down. x is bottom accross.<BR>$my_graph = new GD::Graph::bars(1200,400);<BR>$my_graph->set( <BR> bgclr => "white",<BR> transparent => 0,<BR> x_label => 'Per 30 sec increments',<BR> y_label => 'load',<BR> title => "load",<BR> #y_max_value => 20, default computs from dataset<BR> #y_tick_number => 5,<BR> #y_label_skip => 1,<BR> #x_labels_vertical => 1,<BR> fgclr => "green",<BR> #
shadows<BR> #bar_spacing => 2,<BR> #shadow_depth => 4,<BR> #shadowclr => 'dred',<BR>);</DIV>
<DIV>my $format = $my_graph->export_format;<BR>open(IMG,">load.png") or die $!;<BR>binmode IMG;<BR>print IMG $my_graph->plot(\@data)->png;<BR><BR><B><I>Ed Summers <ehs@pobox.com></I></B> wrote:</DIV>
<BLOCKQUOTE class=replbq style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #1010ff 2px solid">On Wed, Mar 10, 2004 at 09:38:09AM -0800, matt boex wrote:<BR>> Can't call method "png" on an undefined value ....<BR><BR>Can we see the code? While it's alot of data, I don't think GD::Graph should<BR>have a problem with it.<BR><BR>//Ed<BR>_______________________________________________<BR>Chicago-talk mailing list<BR>Chicago-talk@mail.pm.org<BR>http://mail.pm.org/mailman/listinfo/chicago-talk</BLOCKQUOTE><p><hr SIZE=1>
Do you Yahoo!?<br>
Yahoo! Search - <a href="http://search.yahoo.com/?fr=ad-mailsig-home">Find what you’re looking for faster.</a>