Skip to content
Prev 245019 / 398503 Next

300 dpi and eps:

Thank you Jeff for your advice,
Maybe it was better my email subject to had been "high quality R graphs 
for publication" instead of "300 dpi and eps".

a. In my latest response I was asking for any published paper/book 
(written by anybody in the R list) that describes how R handles vector 
graphs and raster graphs. Must be technical that Jeff did not like it. 
See the end of this email for a suggestion.

But let's come to a more practical question:

b. I was asking also how one handles in R the relation between page 
height, page width and pixels per unit.

For example I find from the discussion list different responses:

"EPS is perfectly acceptable in Word on a PC. The only proviso is that, 
as has been mentioned, Word will only display a low resolution bitmap 
"preview" of EPS image in the document on screen whilst editing. When 
printed to a postscript printer or converted to PDF via something like 
Distiller or via publishers' online submission tools, the figure will be 
in the best possible quality." (Simpson).

"For publication, it would be rare to want to use a bitmapped format 
such as jpg/png, pdf and eps are vector based formats and would be 
generally preferred over the above." (Schwartz)

The practical response I found for point b) is the following (by Wiley 
responding to someone else question):
"You have set the resolution, but you have not set the width/height. The 
res argument generally controls how many pixels per inch (PPI which is 
often used similarly to DPI). So if you want 800 DPI and you want it to 
be a 4 x 4 inch graph something like: tiff(file = "temp.tiff", width = 
3200, height = 3200, units = "px", res = 800); plot(1:10, 1:10); 
dev.off(); This will make a file that is 3200 x 3200 pixels, with an 800 
resolution gives you 3200/800 = 4 inches. I would also recommend 
choosing some sort of compression or you will end up with a rather large 
file."

So I come back to R tiff() function and see this example:
tiff(filename = "Rplot%03d.tif", width = 480, height = 480, units = 
"px", pointsize = 12, compression = c("none", "rle", "lzw", "jpeg", 
"zip"),  that reminds also for the compression importance for large 
graphs produced.

Following Wiley's example, if I use res=300 then I get 3200/300=10.66667 
inches for the size of the graph. So I wanted to see how Jeff or other 
listers handle these graph manipulations in R? Why width and height have 
to be the same size based on these examples? What happens if the paper 
is 8.5i. x 11i., what do you do? What is the best advice how to produce 
in R graphs that can be acceptable for publications?

There are many good examples in R News for papers that explain best 
different aspects of plotting, but I would suggest someone competent in 
this area write a great paper to explain technicalities of "how to 
create a high quality R graph for publication" if this does not exist.

TIA,

Aldi
On 12/15/2010 10:24 AM, Jeff Newmiller wrote:
--