[R] Graphical output format

Dieter Menne dieter.menne at menne-biomed.de
Thu May 14 09:58:25 CEST 2009


Stats Wolf <stats.wolf <at> gmail.com> writes:

> 
> Saving a plot with pdf gives a very nice result:
> 
> pdf("myplot.pdf")
> par(font=1,family='serif')
> plot(pressure)
> dev.off()
> 
> Doing the very same with other formats (png, jpeg, tiff) gives far
> worse results. Is there anything to do to make a plot in some other
> format than pdf look like the pdf? Hardly any journal accepts pdf
> files for figures, and most do accept png and jpeg -- so no matter
> what I think about this, I must follow this rule. What can I do, then?

Either create the graphs with very large width and height (usually 
corresponding to 600dpi); scaling may be tricky if you use this way,
check the pointsize parameter.

Or, my preferred way: create pdf, and use Ghostview to make the 
conversion. There is  nice utility called GhostFriend that helps
in getting the horrible parameters right and processing whole
directories.

Dieter




More information about the R-help mailing list