[Graph-dev] Chart::Graph::Gnuplot
Ronan
r.mcglue at qub.ac.uk
Wed Feb 22 12:48:40 PST 2006
Hi, im trying to get gnuplot working from within perl
heres a list of all i can think of that you may need to help me diagnose
the problem.
running on Splack 10 on an untlra5 sun box.
src to my test prog
#!/usr/local/bin/perl -w
use CGI qw(:standard);
use Chart::Graph::Gnuplot qw(gnuplot);
#use strict;
#use DBI ;
print header;
print start_html("Daily Stats Frontend");
my @data=[[1,10],[2,20],[3,30],[4,40]];
gnuplot({"output file" => "../icons/hello.png",
"output type" => "png"},
[{"title" => "data1","type" => "matrix"},[[1,10],[2,20],[3,30],[4,40]]]);
print "<img src=\"icons\/hello\.png\">";
print "</body></html>";
HTML SOURCE as displayed by firefox
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US" xml:lang="en-US">
<head>
<title>Daily Stats Frontend</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
</head>
<body>
<img src="icons/hello.png"></body></html>
tail -f error/access logs
==> /var/log/apache/access_log <==
143.117.9.15 - - [22/Feb/2006:18:07:58 +0000] "GET /test.pl HTTP/1.1"
200 385
143.117.9.15 - - [22/Feb/2006:18:07:58 +0000] "GET /icons/hello.png
HTTP/1.1" 304 -
==> /var/log/apache/error_log <==
invalid output type: png at /var/www/htdocs/test.pl line 13
ls -lrt ../icons/hello.png
-rw-r--r-- 1 root root 0 Feb 22 17:27 ../icons/hello.png
root at mailstats:/var/www/htdocs# ls -ld ../icons/
drwxrwxr-x 6 root root 12288 Feb 22 17:27 ../icons//
root at mailstats:/var/www/htdocs#
root at mailstats:/var/www/htdocs# ldd `which gnuplot`
libz.so.1 => /usr/lib/libz.so.1 (0x7002c000)
libgd.so.2 => /usr/local/lib/libgd.so.2 (0x7004c000)
libjpeg.so.62 => /usr/lib/libjpeg.so.62 (0x700a8000)
libpng12.so.0 => /usr/lib/libpng12.so.0 (0x700d8000)
libm.so.6 => /lib/libm.so.6 (0x70114000)
libc.so.6 => /lib/libc.so.6 (0x70198000)
/lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x70000000)
Im completly baffled here what could i be doing wrong???
thanks in advance
Ronan
--
Ronan McGlue
Analyst / Programmer
CMC Systems Group
Queens University Belfast
More information about the Graph-dev
mailing list