Skip to content
Prev 174936 / 398503 Next

Plot inside For loop

I agree.  Not sure exactly what you are trying to do, but here is a simple example:

y_vals<-rnorm(1000)
x_vals<-1:1000
plot(y_vals, col=(257+ii*10))
for(ii in 1:5)
{
	y_vals<-rnorm(1000)
	points(x_vals, y_vals, col=(257+ii*10))
}

Hope this helps.  Check out points.
--- On Wed, 3/25/09, Rowe, Brian Lee Yung (Portfolio Analytics) <B_Rowe at ml.com> wrote: