R/General Information on Plotting

From QERM Wiki
Revision as of 00:03, 5 January 2010 by Chloe (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search


Graphics Devices

R plots can be produced in the graphical user interface and viewed there or saved in various formats. However, it can be useful (especially when using LaTeX) to produce figures in R directly as a pdf file. To learn more about this option, get help on ?pdf within R.


The basic idea is to write out a sequence of pdf files (i.e. myfile0.pdf, myfile1.pdf, myfile2.pdf, ...) from R, then stitch them together into an animation.


pdfanim is a package for LaTeX, so if you want your animation in a LaTeX document or already use LaTeX, this is a great way to go. Here's a sample file, fill in refname with how you want to refer to the animation, fileprefix with the file prefix (i.e. myfile) including relative path if necessary, and #files with how many files there are (assumed to be numbered starting with 0).









See also

R tips

Personal tools