[R] Sweave, ggplot2 and two-page figures

From: Aric Gregson <agregson_at_mednet.ucla.edu>
Date: Tue, 10 Jun 2008 15:22:46 -0700

I am using Sweave to generate a document in which ggplot2 figures are embedded. I am using the following code in a particular plot within a subfloat environment:

<<qplotARbosreg, echo = FALSE, fig = TRUE>>= print(qplot(bosday2, Arday2, data= arbostimearonlyNArm, colour=factor(bos2), shape=factor(bos2), size=factor(cumARscore), position="jitter", main="Days to BOS by Days to First AR", xlab="Days of Follow-up", ylab="Daysto First AR") + geom_smooth(aes(group=bos2), method='rlm', fill=alpha("grey", 0.4)) +

 scale_shape(solid=FALSE,name="BOS\nFalse = 0\nTrue = 1") +  
 scale_size_identity() + facet_grid(bos2 ~ ., margins=TRUE)
+scale_colour_manual(name="BOS\nFalse = 0\nTrue = 1", values=c("blue",
grid.gedit(gPath("strip","label"),gp=gpar(fontsize="14", col="red")) @

I am unable to get the plot with the modified strip labels to be included. It is created as the second page of the first plot and only the first page is included in the latex document. I want the second page of the plot, not the first page.

Thanks for any assistance.


(R version 2.7.0)

R-help_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Received on Tue 10 Jun 2008 - 22:32:36 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Wed 11 Jun 2008 - 00:30:49 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive