John
unread,Jan 24, 2009, 10:18:45 AM1/24/09Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to ggplot2
I may be crazy, but I think the path parameter on ggsave doesn't work
on Mac.
# path
this.dir <- "/Volumes/user/Documents/R Stuff/SRT/"
# path without trailing slash
this.dir <- "/Volumes/user/Documents/R Stuff/SRT"
# ggsave with path, works on windows and doesn't work on Mac
version 1: ggsave(p, "fname.eps", path=this.dir)
# this works on both mac and windows
version 2: ggsave(p, paste(this.dir, "fname.eps", sep=""))
Version 1 using the path does not work on Mac but does work on Windows
(I move regularly between the two systems). It's not a practical
problem; I just use version 2. But I thought I'd note it. Just in
case I tried a version leaving off the trailing / but that didn't make
a difference. On mac, ggsave with just a file name saves the file
into the home directory.
By the way, I've found that using ".eps" gives me the best results
with Microsoft Word (at least on Windows). My second best had been to
use the copy metafile in the Windows environment and then paste into
word. But I had to screw around with sizes in Word and the result was
not always for the best. With ".eps" I can specify the size in ggsave
and this works when I insert the picture file into my word document.
In other words, I disagree with the advice given in section 8.3 of the
book.
-- John Goldin