Skip to content
Prev 74962 / 398502 Next

Graphics on MacOSX

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

            
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)