[R] multiple plots with par mfg

Yan Wong H.Y.Wong at leeds.ac.uk
Tue May 23 13:36:12 CEST 2006


Hi,

I'm trying to add points to 2 plots on the fly using par(mfg=vector)  
so switch between them. However, the appropriate scales aren't  
switched when changing from one plot to another, e.g.

par(mfcol=c(2,1))
plot(1,1, col="blue")        # blue plot
plot(1.2,1.2, col="red")     # red plot
points(1.1,1.1)   # appears to bottom left of red point
par(mfg=c(1,1))   # switch plots
points(1.1,1.1)   # should appear at top of blue point, but appears  
as on red plot
#
 > version
          _
platform powerpc-apple-darwin7.9.0
arch     powerpc
os       darwin7.9.0
system   powerpc, darwin7.9.0
status   Patched
major    2
minor    2.1
year     2006
month    03
day      02
svn rev  37488
language R


Is this a bug? if not, can anyone suggest a way of appending to 2  
separate plots on the fly.

Thanks

Yan Wong
Leeds



More information about the R-help mailing list