HTML-Embperl - Problems to show images

Posted on Mon Oct 22 17:36:21 2007 by mlika
Problems to show images
I'm trying to show a image, but I haven't had success. I need some help! That's my code. I'm using R to create a ps image, after that I convert to png and want to show.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html";> <title>teste 18102007</title> </head> <body> [+ use strict; use lib '/usr/lib/R/bin/exec'; use lib '/home/Statistics-R-0.02/lib'; use Statistics::R; # plot something my $R = Statistics::R->new() ; $R->startR; $R->send(qq (xVal <- c(1,2,3,4,5,6))); $R->send(qq (yVal <- c(3,5,2,6,1,5))); my $path = "/home/rulee/interface/images/perlPlotTest.ps"; $R->send(qq(c(postscript("$path",horizontal=FALSE , width=500 , height=500 , pointsize=1), plot(xVa +l,yVal), dev.off()))); my $ret = $R->read; exec "convert /home/rulee/interface/images/perlPlotTest.ps /home/rulee/interface/images/perlPlotTes +t.png"; my $graphicname = "../images/perlPlotTest.png"; +] <p><img src="[+ $graphicname; +]" alt="test"></p> </body> </html>
Write a response