Skip to content
Prev 176402 / 398503 Next

change default output size when using Sweave

On 4/7/2009 10:39 AM, Mark Heckmann wrote:
You can specify height and width as arguments to the code chunk or set 
new defaults with something like

\SweaveOpts{width=5,height=3}

(I think those measurements need to be given in inches; I don't think 
there's a way to use an expression like unit(80,"mm").)

You can also control the size of the plot in the final document with 
LaTeX code like

\usepackage{graphicx}
\setkeys{Gin}{width=3in}

and then the LaTeX rules for handling units would apply, so 80mm is fine 
instead of 3in.

Duncan Murdoch