I would like to stick four plots in a 2x2 plot to fit on a single page. I'm using the package Sweave to generate PDF with Latex.
This is my code, however, it generates each plot to a single page.
<<plot1, fig=TRUE, echo=FALSE>>=
slices <- c(3, 1,1)
lbls <- c("Bien", "Regular", "Mal")
pie(slices, labels = lbls, main="¿Cómo te está sentando la medicación?")
@
<<plot2, fig=TRUE, echo=FALSE>>=
slices <- c(2, 2,1)
lbls <- c("Si", "Puedo mejorarla", "No")
pie(slices, labels = lbls, main="¿Estás llevando una alimentación adecuada?")
@
<<plot3, fig=TRUE, echo=FALSE>>=
slices <- c(1, 1,3)
lbls <- c("Si", "Puedo hacer más", "No")
pie(slices, labels = lbls, main="¿Realizas suficiente ejercicio físico?")
@
<<plot4, fig=TRUE, echo=FALSE>>=
slices <- c(3, 3, 1,4,1)
lbls <- c("Contento", "Tranquilo", "Enfadado", "Bien", "Nervioso", "Deprimido")
pie(slices, labels = lbls, main="¿Cómo te has sentido anímicamente esta semana?")
@
par(mfrow = c(2,2))and make only one plot with Sweave. - Mikko