Combine plots in R -
i have several plots want combine them , add title combined plot, somehow cannot combine them using r. (using rstudio)
- combine 2 residual plots plotted using
plot(resid(lme))lme linear mixed model. - combine 2 interaction plots plotted using
interaction.plot(x1,x2,y)x1 , x2 2 independent variables, , y dependent variable.
i tried store plots variables , use grid.arrange, cannot stored variable (just produce plot in plot area).
i.e.
> int1 <- interaction.plot(data_pos_10$day,data_pos_10$drug,data_pos_10$tumor.volume, + xlab="day",ylab="tumor volume",main="interaction plot batch 10", + legend=f, + col=c("red","red","green","black","blue"), + lwd=2, + lty=c(1,2,3,4,5)) > int1 null
before plotting code, run par(mcol=c(2,1)) stack them vertically or par(mcol=c(1,2)) stack them horizontally.
Comments
Post a Comment