[R] changing Swaeve output settings for .pdf and .eps - is there a way?

Duncan Murdoch murdoch at stats.uwo.ca
Fri Apr 17 12:46:13 CEST 2009


cameron.bracken wrote:
>
> markheckmann wrote:
>   
>> The pdf() settings do not affect Sweave settings when producing a .pdf
>> graphic. How can I change the Sweave default settings to e.g. 3 inch?
>>
>>     
>
> Also, even if you set the width of your plot to 3 inches, the plot will be
> expanded to 80% of the textwidth by default.  To disable this (i.e you set
> width=3 and your plot is actually 3 inches) use 
>
> \usepackage[nogin]{Sweave}.
>   
> You will have to copy Sweave.sty to your local directory or to your texmf
> directory for this to work. 
>
>   
You shouldn't need Sweave.sty in your local directory for this to work.  
You aren't changing it,
just using one of its options.

There are other ways to control the size:  it isn't always 80%.  I 
normally use something like
\setkeys{Gin}{width=0.75\textwidth} to control it.  You can reset this a 
number of times in
the same document.  (Read the LaTeX docs for graphicx to see the other 
keys that can be set.)

Duncan Murdoch




More information about the R-help mailing list