danambroseUK has asked for the wisdom of the Perl Monks concerning the following question:
sample datafile:$graph .= <<BLOCK; set terminal png transparent set output "tmp/$random.png" set size 0.9,0.5 set pointsize 0 set xdata time set format x "%a\\n%H:00" set ylabel "Degrees C" set xlabel "Hours" set timefmt "%Y-%m-%d%H:%M:%S" set key below plot\\ BLOCK foreach $i (@inputs){ $graph = $graph . "\"tmp/$random.dat\" using 1:" . $c . " title '$i' w +ith lines,\\\n"; $c++; } $graph = substr($graph, 0, (length($graph)-3)); open (GNUPLOT, "|/usr/bin/gnuplot") or die $!; print GNUPLOT $graph . "\n\n"; close (GNUPLOT);
The datafile is made fine, but no graph image file is produced. When i save $graph to file and then paste it to gnuplot on command line - its works fine. Your help would be great! Danset terminal png transparent set output "tmp/854.png" set size 0.9,0.5 set pointsize 0 set xdata time set format x "%a\n%H:00" set ylabel "Degrees C" set xlabel "Hours" set timefmt "%Y-%m-%d%H:%M:%S" set key below plot\ "tmp/854.dat" using 1:2 title 'D4_AVG' with lines
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: gnuplot problems
by Abigail-II (Bishop) on Apr 22, 2004 at 10:47 UTC | |
by danambroseUK (Beadle) on Apr 22, 2004 at 19:43 UTC | |
|
Re: gnuplot problems
by Fletch (Bishop) on Apr 22, 2004 at 14:28 UTC |