[R] resolution (dpi) problem

Marc Schwartz
Sat, 26 Apr 2008 22:11:31 -0000

See comments inline:

Chris Walker wrote:
> I am using R 2.4.1 with Windows XP.

First, you are using a version of R that is a year and a half and 6
releases out of date.  Version 2.7.0 was just released this past week.
You can download it from your nearest CRAN mirror.

> I use the plot command in a fairly simple script and I use the right mouse
> click on the plot and save as a postscript file. I used the resultant file
> in a paper which was submitted electronically. However, I get the following
> response from the journal:
>
> Your manuscript has been unsubmitted because you failed to meet the
> submission guidelines as indicated below:
>
> -Your figures must be submitted in TIFF or EPS format according to the
> following minimum resolutions:
>
> 1200 dpi for black and white line art (simple bar graphs, charts, etc.)
> 300dpi for halftones (black and white photographs) 600dpi for combination
> halftones (Photographs that also contain line art such as labeling or thin
> lines)
>
> Does anyone know how to produce the correct settings for the journal (i.e.
> 1200 dpi)?

Their comments about resolution apply to TIFF files and not EPS files,
which are resolution independent.

It has been several years since I last used the Windows version of R,
but if the 'File Save As' menu for the plot indicates Postscript and not
Encapsulated Postscript, that is your problem.

You can use dev.copy2eps(...) after you have plotted the graphic to the
screen device, or better, plot directly to an EPS file by surrounding
your plot code with:

   postscript("FileName.eps", width = X, height = Y, paper =
"special",
              horizontal = FALSE, onepage = FALSE)

      YOUR PLOT CODE HERE

   dev.off()


See ?dev.copy and/or ?postscript for more help.

And...be sure to install the latest version of R.  :-)

HTH,

Marc Schwartz