RE: [R] multiple plots..again

2004-01-28 Thread Andy Bunn
Have you tried layout?

layout(matrix(1:10, 5, 2, byrow = TRUE))
for(i in 1:10){
plot(rnorm(100), type = "l", col = "red", main = paste("Your
Variable Number", i, sep = " "))
lines(runif(100), col = "blue")
}

Does this get you started?

-A

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


[R] multiple plots..again

2004-01-28 Thread Simon Melov
Hi,
I realize many posts have been written about this, but I have gone 
through the archives and cannot find an example/solution particular to 
my problem.

I have two Df's as follows

Df-1
Time V1 V2 V3...V100
9 0.5 1.8 -0.3 ..
14 2 -0.4 0.003..
19 -4 3 0.1..
Df-2 is the same but has different values for the variables

I would like to plot the individual variables against time for both 
Df-1 and Df-2 (i.e. time along the x axis, "V" along the yaxis) in the 
same plot. I need to do this for all 100 variables as separate graphs. 
I would like 10 plots/page (Ive tried various combinations of mfrow - 
but cant get the result I want). Each plot should be labeled with the 
appropriate Variable name (it would also be nice to have the lines on 
the plot differentiated by color, and the respective Df they are from).

I realize this is pretty straightforward, but for the life of me, I 
cant seem to get it right!

please help!

simon.

__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html