[R] figure widths in sweave

John Charles Considine vinum at iinet.net.au
Tue Sep 27 05:40:51 CEST 2005


On Mon, 2005-09-26 at 20:34 +0800, John Charles Considine wrote:
> gRoovers,
> 
> Can the size of figures be controlled from within a noweb document
> without resorting to editing the \includegraphics sections in the .tex
> file?
> 
yes,
Sweave sets graphics widths to 0.8\textwidth by default.  To change it
for a document, to say 1.0\textwidth, include the line 

\setkeys{Gin}{width=1\textwidth}

after \begin{document} in the noweb file.

see p.12 of Sweave manual at...
http://www.ci.tuwien.ac.at/~leisch/Sweave/Sweave-manual-20050914.pdf
 

> Can the figure widths be set in the environmental declarations at the
> start?
> 
> Can they be set within the \begin{figure} environment?
> 
> JC
> 
> ______________________________________________
> 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