I want to make a 2x2 plot on a single page, using stripplot() and boxplot().
I tried the following two alternatives with mfrow() and layout(), but none
of them worked.

library(lattice)
par(mfrow=c(2,2))
boxplot(X1 ~ Y, data=tst1, horizontal=T, las=1)
boxplot(X2 ~ Y, data=tst1, horizontal=T, las=1)
stripplot(Y ~ X1, data=tst1)
stripplot(Y ~ X2, data=tst1)
par(mfrow=c(1,1))

nf <- layout(matrix(c(1,2,3,4), 2, 2, byrow=TRUE))
layout.show(nf)
boxplot(X1 ~ Y, data=tst1, horizontal=T, las=1)
boxplot(X2 ~ Y, data=tst1, horizontal=T, las=1)
stripplot(Y ~ X1, data=tst1)
stripplot(Y ~ X2, data=tst1)

What happens is that the two plots with boxplot() appears on one page, and
each stripplot() appears on a single page.

If I use stripchart() instead of stripplot() things works as expected (a 2x2
plot on a single page).

What to do to get a 2x2 plot using stripplot()?


Thanks
Lars

        [[alternative HTML version deleted]]

______________________________________________
R-help@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.

Reply via email to