[R] Plot inside For loop

Nutter, Benjamin NutterB at ccf.org
Wed Mar 25 19:43:20 CET 2009


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 these are your goal, then I'm afraid I'll need more
clarification on what you're trying to do.

Benjamin

-----Original Message-----
From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-project.org]
On Behalf Of Mohan Singh
Sent: Wednesday, March 25, 2009 1:54 PM
To: r-help at r-project.org
Subject: [R] Plot inside For loop

Hi

   I am plotting a set of data inside a for loop.

   Is it possible to use plot in for loop without redrawing the whole  
plot? Am using par(new=TRUE) but that draws on top of the previous plot.

   Couldn't find any threads about the topic.

Thanks
Mohan
--

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


===================================

P Please consider the environment before printing this e-mail

Cleveland Clinic is ranked one of the top hospitals
in America by U.S. News & World Report (2008).  
Visit us online at http://www.clevelandclinic.org for
a complete listing of our services, staff and
locations.


Confidentiality Note:  This message is intended for use\...{{dropped:13}}




More information about the R-help mailing list