[R] Creating images without X11

Mario Valle mvalle at cscs.ch
Sun Mar 14 09:47:19 CET 2010


Is it possible the problem is another?
I cannot generate png images when R runs on a machine without 
*installed* X11

Here is the error message when I submit a simple png() plot on a 
computing node of my cluster.

Error in X11(paste("png::", filename, sep = ""), width, height, 
pointsize,  :
   unable to start device PNG
Calls: png
In addition: Warning message:
In png("Test.png") : unable to open connection to X11 display ''
Execution halted

The solution for my problem is to generate pdf files (that are then 
included in a LaTeX paper, so the "solution" does not help you).

Ciao!
		mario

On 14-Mar-10 6:14, Sharpie wrote:
>
>
> Jillian E Kozyra wrote:
>>
>> Dear Colleagues,
>>
>> We are attempting to create trees using R with our Ruby on Rails
>> application. However, we are running into a problem involving the
>> creation of the graphic. We would like them to be in either jpg or png
>> format so that users can save, but due to a lack of control over our
>> sever we are unable to start X11 server. Is there a way to create
>> these images without using X11 server?
>>
>> Thanks,
>> JIllian
>>
>>
>
> I had this exact same problem last summer when attempting to set up an
> automated process involving image generation on a remote server.  Since I
> didn't have admin rights to the server, I ended up switching to the Cairo
> package for image generation as it uses the Cairo library rather than X11 as
> the back end.
>
> The other solution involved setting some sort of obscure, arcane X11
> permission that I can't recall right now.  All I can recall is that finding
> it was a frustrating half-day of Google searching and digging through man
> pages.
>
> I would suggest Cairo.
>
> Hope this helps!
>
> -Charlie
>
> -----
> Charlie Sharpsteen
> Undergraduate-- Environmental Resources Engineering
> Humboldt State University

-- 
Ing. Mario Valle
Data Analysis and Visualization Group            | 
http://www.cscs.ch/~mvalle
Swiss National Supercomputing Centre (CSCS)      | Tel:  +41 (91) 610.82.60
v. Cantonale Galleria 2, 6928 Manno, Switzerland | Fax:  +41 (91) 610.82.82



More information about the R-help mailing list