Mark Heckmann
2009-Apr-16 13:07 UTC
[R] changing Swaeve output settings for .pdf and .eps - is there a way?
Is there a way to change the default settings for Sweave figure output? Sweave produces an .eps and a .pdf file as output (7x7 inch). Changing pdf defaults changes the pdf() function output size but does not affect the pdf size produced by Sweave. pdf.options(height=3) pdf("myfile.pdf") plot(1:10) dev.off() --> graphic height is 3 inch <<>>pdf.options(height=3) @ <<fig=TRUE, echo=TRUE>> plot(1:10) @ --> graphic height is 7 inch 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? TIA, Mark PS. I posted a similar matter a week ago (https://stat.ethz.ch/pipermail/r-help/2009-April/194352.html), but now I think the question is much more precise. ------------------------------- Mark Heckmann www.markheckmann.de http://ryouready.wordpress.com
cls59
2009-Apr-17 05:57 UTC
[R] changing Swaeve output settings for .pdf and .eps - is there a way?
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? > >Try setting the width and height options in the figure chunk: <<fig1,echo=F,plot=T,pdf=T,width=5,height=3>> plot(1:10 @ To make a certain set of dimensions the defaults, use \SweaveOpts: \SweaveOpts{width=5,height=3} -Charlie ----- Charlie Sharpsteen Undergraduate Environmental Resources Engineering Humboldt State University -- View this message in context: http://www.nabble.com/changing-Swaeve-output-settings-for-.pdf-and-.eps---is-there-a-way--tp23078496p23091546.html Sent from the R help mailing list archive at Nabble.com.
cameron.bracken
2009-Apr-17 06:41 UTC
[R] changing Swaeve output settings for .pdf and .eps - is there a way?
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. -- View this message in context: http://www.nabble.com/changing-Swaeve-output-settings-for-.pdf-and-.eps---is-there-a-way--tp23078496p23091931.html Sent from the R help mailing list archive at Nabble.com.