Re: [R] Multiple graph in one graph window

2010-09-25 Thread Andrew Miles
Another option is to use the par() command before executing a plot command, like so: par(mfrow=c(2,2)) plot(...) This will put the next four plots all in the same window. Andrew Miles Department of Sociology Duke University On Sep 24, 2010, at 10:28 PM, Dennis Murphy wrote: Which one do

[R] Multiple graph in one graph window

2010-09-24 Thread mrdawoud
Dear R users; Could you tell me how to let R create multiple graphs in a graph window. Please note that I am talking about creating multiple plots in the same page of the graph window. For example: g1=c(1,2,3) g2=c(3,1,7) g3=c(4,2,11) g4=c(5,5,9) ... all in one graph window. Best Regards

Re: [R] Multiple graph in one graph window

2010-09-24 Thread Dennis Murphy
Which one do you want? library(lattice) d - data.frame(x = rep(1:3, 4), g = factor(rep(1:4, each = 3)), y = c(1, 2, 3, 3, 1, 7, 4, 2, 11, 5, 5, 9)) xyplot(y ~ x | g, data = d, pch = 16) xyplot(y ~ x, data = d, groups = g, type = c('p', 'l'), pch = 16) Both provide 'multiple