You can do it without necessarily bothering with that module. Abigail-II told me how he does it, so here's a snippet I wrote.
I just pass it a filename (which I had previously created with File::Temp). My::Class->create_graph( $filename );# {{{ ->create graph method # sub create_graph { my $class = shift; open my $plot => "| /usr/local/bin/gnuplot" or die "Failed to open pipe: $!\n"; my $outfile = "/tmp/graph.png"; print $plot <<" --"; set terminal png color set out "$outfile" set format x "/%b%y/" set xdata time set key left top Left reverse samplen 2 title "Legend" box set timefmt "%s:" set grid xtics ytics set xtics nomirror set ytics nomirror set y3tics nomirror set autoscale set ylabel "ResponseTime" plot "$_[0]" using 1:2 smooth unique axis x1y1 title "Time in +ms" -- #set timefmt "%Y-%m-%d:" close $plot or die "Failed to close pipe: $!\n"; chmod 0644 => $outfile or die "Failed to chmod $outfile: $!\n" +; } # }}}
--
"A long habit of not thinking a thing wrong, gives it a superficial appearance of being right." -- Thomas Paine
naChoZ
In reply to Re: Chart::Graph::Gnuplot Array Issue
by naChoZ
in thread Chart::Graph::Gnuplot Array Issue
by vbrtrmn
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |