[R] generating graphical output when DISPLAY is not set?
Petre Dimitrov
pdimitro at gnf.org
Wed May 1 03:01:18 CEST 2002
Do you have libpng installed properly on your machine? It seems R is not linked against that library. Check the output of ./configure or config.log whether the check for libpng was succesfull. If not, go to www.libpng.org/pub/png/libpng.html to download and install the relevant binary or source. Assuming you have Linux distro with rpm package management, you can download libpng-devel package from ftp.redhat.com or mirrors.
Once R is linked against that library, look at the help for png() for the proper way to redirect the plotting to a file.
Peter Dimitrov
-----Original Message-----
From: Simon Cawley [mailto:simon_cawley at affymetrix.com]
Sent: Tuesday, April 30, 2002 1:51 PM
To: r-help at stat.math.ethz.ch
Subject: [R] generating graphical output when DISPLAY is not set?
Is it possible to generate graphical output (to a file) when the
DISPLAY environment variable is not set? Here's the problem:
$ unset DISPLAY
$ R
> png("foo.png")
Error in X11(paste("png::", filename, sep = ""), width, height, pointsize, :
unable to start device PNG
In addition: Warning message:
unable to open connection to X11 display`'
I want to have a process running on a server call R to generate graphical
output, and the problem is that I'm not guaranteed to have a valid
DISPLAY set. I have some clumsy workarounds, but it would be cleaner if
if I had some way to have R not require the DISPLAY.
Thanks,
-Simon
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
More information about the R-help
mailing list