[R] which one give clear picture-pdf, jpg or tiff?

(Ted Harding) Ted.Harding at manchester.ac.uk
Fri Aug 20 11:54:40 CEST 2010


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")
  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.Harding at manchester.ac.uk>
Fax-to-email: +44 (0)870 094 0861
Date: 20-Aug-10                                       Time: 10:54:33
------------------------------ XFMail ------------------------------



More information about the R-help mailing list