Re: [R] Plot inside For loop

2009-03-25 Thread Jason Rupert
-- On Wed, 3/25/09, Rowe, Brian Lee Yung (Portfolio Analytics) wrote: > From: Rowe, Brian Lee Yung (Portfolio Analytics) > Subject: Re: [R] Plot inside For loop > To: "Mohan Singh" , r-help@r-project.org > Date: Wednesday, March 25, 2009, 1:18 PM > It's unclear to

Re: [R] Plot inside For loop

2009-03-25 Thread Mohan Singh
9 3:00 PM > To: Nutter, Benjamin > Cc: r-help@r-project.org > Subject: Re: [R] Plot inside For loop > > basically the for loop goes something like this > > setCounters(135); > > for(i in 1:query) { > plot(c2data[start1:count,],c3data[start1:count,],xlim=c(-30,100), >

Re: [R] Plot inside For loop

2009-03-25 Thread Mohan Singh
March 25, 2009 3:00 PM > To: Nutter, Benjamin > Cc: r-help@r-project.org > Subject: Re: [R] Plot inside For loop > > basically the for loop goes something like this > > setCounters(135); > > for(i in 1:query) { > plot(c2data[start1:count,],c3data[start1:count,]

Re: [R] Plot inside For loop

2009-03-25 Thread Nutter, Benjamin
March 25, 2009 3:00 PM To: Nutter, Benjamin Cc: r-help@r-project.org Subject: Re: [R] Plot inside For loop basically the for loop goes something like this setCounters(135); for(i in 1:query) { plot(c2data[start1:count,],c3data[start1:count,],xlim=c(-30,100), ylim=c(-30,90), sub=i);

Re: [R] Plot inside For loop

2009-03-25 Thread Mohan Singh
basically the for loop goes something like this setCounters(135); for(i in 1:query) { plot(c2data[start1:count,],c3data[start1:count,],xlim=c(-30,100), ylim=c(-30,90), sub=i); points(..); #count increments } so if i use windows() or x11(), i get different plot windows if I use par(),

Re: [R] Plot inside For loop

2009-03-25 Thread Nutter, Benjamin
I understood this to mean you want to open a new plotting window on each iteration of the loop. If this is correct, I usually go about it by using x11() If you're looking to add additional lines or points, then you may want to look at the aptly named functions lines() and points(). If neither of

Re: [R] Plot inside For loop

2009-03-25 Thread Jun Shen
Hi, Brain, I have a similar question. lines() can only add lines to plot(). If I use xyplot(), how do I add lines from a different dataset? Thanks. Jun On Wed, Mar 25, 2009 at 1:18 PM, Rowe, Brian Lee Yung (Portfolio Analytics) wrote: > It's unclear to me what your expected output is. If you a

Re: [R] Plot inside For loop

2009-03-25 Thread Rowe, Brian Lee Yung (Portfolio Analytics)
It's unclear to me what your expected output is. If you are trying to add additional data sets to an existing plot then ?lines should be sufficient. -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Mohan Singh Sent: Wednesday, March 2