See in-line below. On 20-Aug-10 10:37:50, Gavin Simpson wrote: > On Fri, 2010-08-20 at 10:54 +0100, ted.hard...@manchester.ac.uk wrote: >> On 20-Aug-10 09:24:17, Gavin Simpson wrote: >> > On Thu, 2010-08-19 at 20:32 -0700, Roslina Zakaria wrote: >> >> Hi, >> >> >> >> I need some opinion. I would like to use graph that I generate >> >> from R code and save it into word document. Whichformat is better? >> >> pdf, jpeg or tiff? >> > >> > Not that I have used word for a while myself, but when I did EPS >> > files were my preferred format for Word docs that were to be printed >> > or converted to PDF. The only downside is that Word's EPS importer >> > displays a low resolution bitmap image of the EPS in the document >> > so things look pretty sketchy on screen. When printed, however, >> > EPS images will provide top quality. To achieve the same quality >> > with JPEG or TIFF would require a much larger image file and >> > consequently a much larger final document. >> > I still send my Word-using colleagues EPS files for papers we are >> > writing etc. >> > >> > ?postscript for the options needed to produce correct EPS. >> > >> > HTH >> > G >> >> I agree with Gavin about the relative merits of EPS and any bit-mapped >> format (such as jpeg or tiff). And also with Tim Gruene's earlier >> comment that "MS product are a little ignorant of PostScript and PDF": >> not only ignorant, but do not want to know! >> >> However, a further comment about "Word's EPS importer": You will >> only see on screen that "low resolution bitmap image of the EPS" >> when viewing the Word document IF the EPS file is in fact EPSI, >> i.e. it includes a "header" as PostScript Comments in the initial >> section which codes that bitmap for "preview" purposes. EPS files, >> *as such*, by default do not include this, and then you would only >> see on screen the outline box with nothing inside it. (The only >> requirement for a PS file to be EPS is the presence in the Comments >> of a "%%BoundingBox: ..." line). >> >> There is nothing about this that I can see in '?postscript', and >> running a test using >> postscript("testEPS.eps") > > Don't you need onefile = FALSE in that call? An EPS should only contain > a single "page" or image.
So long as you only put one plot in each file it doesn't matter, I think. All that really matters for an EPS file is the BoundingBox line (and of course on should not have multi-page content in an EPS file which one is going to import). On testing, you get no EPSI "preview" header whether you have onefile = TRUE or FALSE. > Back in the day, when I was using word and R, R's EPS files were > imported without the preview (as R doesn't generate one). Later on, > a low resolution bitmap was being displayed. I presumed this was > because I was using a newer version of office. I generate EPS using > postscript(..., onefile = FALSE) and with no further processing, my > colleagues see the low res bitmap in Word. Now that you remind me, I do recall sending EPS (not EPSI) files to someone and they could see them in Word (recent version). So perhaps Office has moved on (slightly)! Like you, I use Linux and try to avoid exposure to Word etc., so undoubtedly lack recent experience. Ted. > Like I said, I don't use Word any more and am writing this from a Linux > box so can't check but that is my experience from working with > colleagues who do use Word. > G > >> plot(...) >> dev.off() >> produced an EPS file with no such EPSI inclusion. >> >> There are PostScript-handling program suites, such as ghostscript, >> which include a facility to convert from EPS to EPSI: in particular, >> ghostscript has the command ps2epsi. >> >> Ted. -------------------------------------------------------------------- E-Mail: (Ted Harding) <ted.hard...@manchester.ac.uk> Fax-to-email: +44 (0)870 094 0861 Date: 20-Aug-10 Time: 12:32:31 ------------------------------ XFMail ------------------------------ ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.