[R] Returning to normal after call to layout()

michael watson (IAH-C) michael.watson at bbsrc.ac.uk
Fri Dec 10 12:47:18 CET 2004


Hi

I have a function which draws a plot, using the layout() function to
divide the screen into two parts.  The function works fine, but then my
next call to plot() draws the plot in the first section of the plot I've
just drawn using layout() - whereas what I want it to do is create a new
plot.

I tried using dev.off() but that just closes the layout plot window,
which is not what I want.  So my question is - after using the layout()
function, "layout(matrix(c(1,2), 2, 1))", how do I tell R that the next
call to a plotting function should use a new window, and not the layout
window?  I've looked in ?layout but there doesn't seem to be anything in
there.

Thanks
Mick




More information about the R-help mailing list