[R] running R without X11

Jeffrey Horner jeff.horner at vanderbilt.edu
Tue Nov 14 22:39:21 CET 2006


Laurence Darby wrote:
> Prof Brian Ripley wrote:
> 
>> On Tue, 14 Nov 2006, Laurence Darby wrote:
>>
>>> Is there anyway to remove this dependency on X11?
>> Please read the help page.  R's png device uses X11 for its fonts.  You 
>> need fonts from somewhere, and vanilla Unix systems don't come with any 
>> other sets.  You can use ghostscript or libgdd or other resources for 
>> other graphics devices.  I normally just use an Xvfb frame buffer (but, 
>> hint, it defaults to 12bit and you want a 24bit screen).
>>
> 
> 
> Thanks for your prompt answer, although getting gs to work the way I
> want or setting up Xvfb, on top of learning R, is too many hoops to
> jump through, much more than reproducing a small R script I have in
> gnuplot.

You can also use Simon Urbanek's GDD or Cairo packages, located on CRAN 
and on www.rosuda.org/R. They both create png's without an X server.

Currently, there are issues with GDD: minimal truetype font support, an 
inability to draw lines thicker than lwd=1, and the worst is it's 
dependence on the neglected libgd graphics library, but apparently 
there's been some active development on it. Check www.libgd.org.

I'm currently adding truetype font support and some antialiasing 
properties to the Cairo package, for the sole purpose of creating better 
graphics for the web. Cairo probably has a longer future as it depends 
on cairo (www.cairographics.org) which is used in the Firefox browser.


Jeff
-- 
http://biostat.mc.vanderbilt.edu/JeffreyHorner



More information about the R-help mailing list