[R-SIG-Mac] How to put nice R graphics into powerpoint

joerg van den hoff j.van_den_hoff at fz-rossendorf.de
Sat Feb 12 16:03:49 CET 2005


Simon Urbanek wrote:
>...
> Finally some good news ;). After some tweaking and bug-fixing I was able 
> to compile pstoedit and libEMF for OS X. The output isn't exactly great, 
> but people who can live with PowerPoint won't notice or mind either, so 
> there it goes:
> http://www.rosuda.org/misc/pstoedit
> That's the binary (statically linked, so nothing else needed). Just 
> download, run
> chmod a+x pstoedit
> on it in Terminal after downloading and you're ready to go. It's a 
> command-line tool, of course, and I highly recommend using the -pta 
> flag. Furthermore due to the limitations of EMF format, you may be 
> better off scaling the image to get somewhat more reasonable result, so 
> you could use something like:
> pstoedit -pta -xscale 16 -yscale 16 test.pdf test.emf
> The reason why scaling makes a difference is that EMF uses integer 
> precision and the grid of possible points is very coarse by default.
> 
> BTW: although the name says "ps..." it actually works much better with 
> R's PDF files than PS. Chances are that you'll need GhostScript in 
> /usr/local/bin - but I guess everyone has that, right?
> 

> 
> Cheers,
> Simon
> 
>
simon,

thanks for the hint (did not know of 'pstoedit').

but the binary provided by you did not run on my machine, exactly 
because 'gs' was _not_ in /usr/local/bin, but rather in /sw/bin (fink 
installation).

is there any way to adjust the search path used by pstoedit? if not so, 
for those with the same problem:

I reinstalled pstoedit via 'fink' from source and that worked out rather 
fine, knowing of the local path to 'gs' and everything.

regards,

joerg

ps: my test run gave satisfactory quality of the .emf output but it was 
a clipped (at the top) version of the pdf input. can that be prevented 
with one of the flags of pstoedit?



More information about the R-SIG-Mac mailing list