[R] pdf() device uses fonts to represent points - data alteration?

Thomas Petzoldt Thomas.Petzoldt at tu-dresden.de
Thu Nov 1 21:18:32 CET 2007


Hi,

this was my former suggestion but as the RSvgDevice doc says:

"This driver currently does not have any font metric information, so the 
use of plotmath is not supported."

Maybe, the future (or already recent) alternative will be:

library(Cairo)

that can among others also create svg and pdf. While I had some problems 
with a former version, it worked now out of the box and was able to do 
both, algebra (plotmath) and geometry (circles) ;-) in high quality. 
Let's see if there is any other drawback.

Thomas P.




jiho wrote:

> On 2007-November-01  , at 20:18 , Thomas Petzoldt wrote:
>> I had the same problem. When opening PDFs with a recent developer 
>> version of inkscape all circles were replaced by the letter "q", see a 
>> screenshoot of the imported figure:
>>
>> http://www.simecol.de/figs/R_pdf_inkscape.png
>>
>> I spent at least two hours trying different development versions of 
>> inkscape, different versions of R, reading docs, trying different 
>> machines, installing fonts etc., finally giving up. Now, the two 
>> workarounds of Paul Murrell indeed solved the problem for *me*. Thank 
>> you. 

[...]

> 
> By the way, depending on what OS you are, you may find an entirely SVG 
> workflow more suitable:
>     R with RSVvgDevice package -1-> SVG figures -2-> Inkscape -3-> 
> whatever you like (SVG, PNG, PDF...)
> This gives all transparency, fonts etc to Inkscape so it is fine on this 
> side. The only "problem" with this workflow for me is that many of my 
> plots stay between stage 1 and 2 and I like to be able to view them 
> quickly. I would need a quick SVG viewer but there are none on OS X. If 
> you are on Linux, many documents viewers (eog, evince, gThumbs) can 
> display SVGs so you would be all set.
> 
> JiHO
> ---
> http://jo.irisson.free.fr/
> 
> 
>



More information about the R-help mailing list