Dear R-help list: I have want seems to be a simple task, but can't find a solution. I tried querying the archives, but did not succeed.
My goal is to set up two (or more) graphs in one graph window, and then during execution of a sequential algorithm add points sequentially to these graphs. The graphs have different scales / coordinates. I use the par(mfg...) command to switch between graphs. The problem is: This only plots points correctly in the last of the graphs. When I try to add a point to say the first graph, it is incorrect, namely it plots that point relative to the coordinate system of the last graph, not the first graph. How can I avoid this problem? I work with older and newer versions of R and both on Windows XP and on Mac OS.10.5. Here is a simple script to illustrate my dilemma: par(mfrow=c(2,1),mar=c(4,4,1,1)) plot(1:40,1:40,type='n') plot(1:20,1:20,type='n') par(mfg=c(1,1)); points(15,5) # this plots incorrectly par(mfg=c(2,1)); points(15,5) # this plots correctly Any help or pointers would be greatly appreciated. Ernst Linder -- Ernst Linder elin...@unh.edu Professor of Statistics Dept. of Mathematics and Statistics University of New Hampshire Phone: 603 862 2687 (work) ______________________________________________ R-help@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.