[R] Plot Font Size in Sweave

From: Doran, Harold <HDoran_at_air.org>
Date: Tue 31 May 2005 - 22:40:04 EST

Dear List

I'm working to modify the font size inside of an plot generated using Sweave. I found a thread in the archives addressing this issue from F. Leisch which suggests the solution below. I'm wondering if this is still the best option for this problem or if another solution may exist.

Here is how I have resolved the issue based on the prior thread.

  1. I modified the original Sweave.sty by commenting out


I then save this as MySweave.sty and make the appropriate change in the rnw to use this sty instead of Sweave

2) I then set the height and width of each plot inside each code chunk and also use ps() inside each code chunk as well to modify the text font size.

For example

<<echo=FALSE, fig=TRUE, eps=FALSE, width=4, height=3>>= par(ps=5) #use this instead of ps.options because I am generating pdfs Create a plot here

I have many graphics inside this document and find myself toying around with height and width a bit going back and forth between R and Tex to get things to look right. This isn't too much of an issue, but I'm not sure it is efficient.

Is this still the best solution?


Windows Xp
R 2.1

        [[alternative HTML version deleted]]

R-help@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 Received on Tue May 31 22:44:28 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:32:16 EST