[R] changing figure size in Sweave
Achim Zeileis
Achim.Zeileis at wu-wien.ac.at
Thu Nov 17 14:32:49 CET 2005
On Thu, 17 Nov 2005, Robin Hankin wrote:
> Hi
>
> In Sweave, how does one change the size of the plots?
Of the actual .eps or .pdf files or of the included figures in the paper?
The former can be done easily via
<<foo,fig=TRUE,height=4,width=8>>=
...
@
etc., the latter can be done most conveniently by setting something like
\setkeys{Gin}{width=0.75\textwidth}
in the LaTeX documentation.
hth,
Z
> I tried using a hook:
>
>
> <<echo=FALSE, print=FALSE, fig=TRUE>>=
> options(SweaveHooks=list(fig=function() ps.options(width=1)))
> library(graphics)
> pairs(iris)
> @
>
> but this didn't change the size of the figure. How to make the
> figures a
> different size?
>
>
>
> --
> Robin Hankin
> Uncertainty Analyst
> National Oceanography Centre, Southampton
> European Way, Southampton SO14 3ZH, UK
> tel 023-8059-7743
>
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
>
More information about the R-help
mailing list