Hi all, I have a graphic device divided in 2 areas for a plot. Is it possible to add lines or points in the first plot after the last one have been set, without plotting all the data again ? Example par(mfrow(2,1)) plot(1) plot(2) lines(c(1,2)) # should be visible in the first plot Thanks for help. Greetings
Prof Brian Ripley
2008-Nov-21 14:44 UTC
[R] post - plotting lines in a divided graphic device
On Fri, 21 Nov 2008, _ wrote:> Hi all, > I have a graphic device divided in 2 areas for a plot. > Is it possible to add lines or points in the first plot after the last one > have been set, without plotting all the data again ?See ?par, look at mfg. However, you would probably find screen() easier to use, and the way you have done this you have lost the coordinate system for the first plot and would need plot(1, new=T) to reset it.> > Example > par(mfrow(2,1)) > plot(1) > plot(2) > lines(c(1,2)) # should be visible in the first plotThat's not a valid R command.> Thanks for help. > Greetings > > ______________________________________________ > 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. >-- Brian D. Ripley, ripley at stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UK Fax: +44 1865 272595