[R] Exporting Numerous Graphs

Polwart Calum (County Durham and Darlington NHS Foundation Trust)
Mon, 14 Sep 2009 08:29:01 -0000

Pretty sure PNG can only cope with single 'page' images - the page can
be as big as it wants but then when it comes to things like printing its gonna
cause problems as I doubt many graphics packages can split it over the page?  So
they'll either crop it or scale it.  27 on 1 page is gonna be very small?

TIFF can handle multiple pages and of course so can PDF.  I don't know of an
export to TIFF function.  So I'd suggest exporting to PDF - and exporting to
27 different file names (1 to 27.pdf)  Then using a tool like pdfshuffler (linux
GUI based) or using command line ghostscript (windows or linux)

gs -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=merged.pdf 1.pdf 2.pdf
3.pdf ...etc... 27.pdf
(This is a linux command not a R command.  The widnwos version will be very
simillar I suspect)

That'd give you a 27 page pdf file with each graph on a new page?  Much
easier to scroll through than using a scroll bar on a graphics package - you can
go back to Page 5 and on to page 9 to compare quickly rather than having to
manually scroll to find the right info.  Plus PDF is vector based which means
future importing into decent desktop publishing packages should avoid and issues
with loss / scaling.

I believe its also possible with psmerge using postscript and so possible EPS
files.


********************************************************************************************************************

This message may contain confidential information. If yo...{{dropped:21}}