[R] Graphics on MacOSX

Stephen D. Weigand weigand.stephen at gmail.com
Thu Aug 4 19:58:53 CEST 2005


Dear Dirk and Hank,

On Aug 4, 2005, at 9:13 AM, Martin Henry H. Stevens wrote:

> This is a big issue for me, causing many days of angst. I finally
> stumbled on the following solution. I create a device save an image
> with postscript(). I then open it in Adobe Acrobat, select the area I
> want, enlarge to at least 400%, then copy, then paste into PowerPoint
> or Word. Alternatively, you can simply save a graphics image through
> the gui and it saves it as pdf. Then go through the steps of selecting,
> enlarging and copying in Acrobat. I am guessing real graphics programs
> would work as well (Photoshop or Illustrator), but I don't have those.
>
> Hank Stevens
>
>
> On Aug 4, 2005, at 8:03 AM, Weismann_D wrote:
>
>> Ist there a possibility on MacOSX to import Graphics into MSOffice
>> Applications and resize them there without decreased quality? When I
>> import
>> via copy&paste I get low quality bitmaps and via import pictures (pdf)
>> it is
>> all the same. In the Windows versions of R there is the convienient
>> way to
>> use metafile format which can easily be resized in ppt and word. What
>> is the
>> equivalent way on MacOSX?
>> Thanks, Dirk.

You could try creating a PNG with bitmap() using a high resolution, 
e.g.,

bitmap("test.png", type = "png256", res = 1200)
plot(1:10, rnorm(10))
dev.off()

Preview can read the resulting PNG file just fine and the Windows 
version of Office can insert PNGs, displays them well, and allows 
resizing. (I don't have an OS X version of Office so can't test that 
the OS X version would handle the PNGs equally well but I would have to 
assume it does.)

bitmap() requires Ghostscript which I have installed on my system in 
/usr/local/bin. I'm not sure whether Ghostscript came with OS X or if I 
installed it myself but it's freely available.

Hope this helps,

Stephen

PS I am using the out-of-the-box R.app:

platform powerpc-apple-darwin7.9.0
arch     powerpc
os       darwin7.9.0
system   powerpc, darwin7.9.0
status   Patched
major    2
minor    1.0
year     2005
month    05
day      12

and Ghostscript 8.13 (2003-12-31)




More information about the R-help mailing list