[R-SIG-Mac] svg & cairo support in 2.12.2 and higher?

Sarah Berke skberke at uchicago.edu
Thu Apr 14 04:04:47 CEST 2011


Hello,

I'm not sure if this is the best list for my question, so please let
me know if I should direct this elsewhere.

When I used R version 2.12.0 on my Mac (Platform:
x86_64-apple-darwin9.8.0/x86_64 (64-bit)), I often used svg() to
create graphics which I then edited in Inkscape.  When I updated to
2.12.2, the code that worked in 2.12.0 started returning an error,
"cairo-based devices are not supported on this build".  Same problem
in 2.13 released today.  And indeed, capabilities() returns FALSE for
cairo, whereas it used to be TRUE.

I tried using {RSvgDev}, but (1) I don't like that I cannot specify a
pointsize, (2) it ignores any color specification of text (gray text
is turned into black), and (3) the vectors come out aliased (i.e., an
'L' shaped vector becomes pixellated at the angle).  svg() did not
suffer from any of these problems.

I also tried installing {cairoDevice}, but when I try to load it I get this:

>require (cairoDevice)
Loading required package: cairoDevice
Error in dyn.load(file, DLLpath = DLLpath, ...) :
  unable to load shared object
'/Library/Frameworks/R.framework/Versions/2.13/Resources/library/cairoDevice/libs/x86_64/cairoDevice.so':
  dlopen(/Library/Frameworks/R.framework/Versions/2.13/Resources/library/cairoDevice/libs/x86_64/cairoDevice.so,
6): Library not loaded:
/Library/Frameworks/GTK+.framework/Versions/2.18.X11/Resources/lib/libgtk-x11-2.0.0.dylib
  Referenced from:
/Library/Frameworks/R.framework/Versions/2.13/Resources/library/cairoDevice/libs/x86_64/cairoDevice.so
  Reason: image not found

For now I have reverted to 2.12.0, but I was wondering if there is any
way to build 2.13 with Cairo capabilities, or if anyone has advice for
getting better-quality svg's in R?

Many thanks,
Sarah



More information about the R-SIG-Mac mailing list