[R] High resolution figures for a paper?

Duncan Murdoch murdoch at stats.uwo.ca
Mon Jun 2 19:18:25 CEST 2008

On 6/2/2008 11:12 AM, zhijie zhang wrote:
> Dear Rusers,
>   My manuscript has been conditionally accepted recently. The problem to
> generate the high  resolution figures in R for the manuscript cannot be
> solved by me.
> The journal editor ask me to generate the figures with a minimum resolution
> of 500 dpi. I have tried the *menu-driven method* to save the figures as
> JPEG (100% printed quality), but the results seem not to be very good. I
> have submitted the generated figures twice using the above-mentioned method,
> but the Editor think the resolution is still very low.
>   Finally, i used the Photoshop to check the figure. It seems that its
> resolution for JPEG (100% printed quality) is about 72dpi.
>   *Does anybody know a better method to save a figure with user-defined
> resolution in R software, especially high resolution? Could u please show me
> an example if possible?*
>  I hope to save the figures as TIFF/JPEG format at 1000 dpi.
>  Thanks a lot.

Don't use the menu, produce the figure directly.  I would recommend 
against using TIFF or JPEG; a vector format like PDF is much easier. 
However, if you really want one of those, open the device explicitly. 
For example,

jpeg("test.jpg", width=5, height=5, units="in", res=500)

This will create a very big file, 2500 by 2500 pixels, meant to be 
displayed as a 5 inch by 5 inch figure.

Duncan Murdoch

More information about the R-help mailing list