Skip to content
Prev 38917 / 398500 Next

Strange behaviour

Hi
v.demart at libero.it wrote:
The "nasty rectangles" are the output of the layout.show() function. 
This function draws a simple diagram (consisting of nasty rectangles) to 
indicate the regions that a call to layout() has set up.  It is designed 
to help users to understand what on earth the layout() function is 
doing.  (It is NOT a necessary part of setting up an arrangement of 
plots using the layout() function.)

I suspect that the author of "simpleR" may have accidentally left the 
layout.show() call in simple.scatterplot() when copying the example from 
the layout() help file (apologies to John Verzani if this is an unfair 
diagnosis).

So the immediate solution to your problem is to remove the line ...

     layout.show(nf)

... from simple.scatterplot().  The output should then be a single page 
which should "include" ok in latex.

The larger problem of how to get at individual pages of output is 
probably best solved using something like the "onefile" argument to 
devices.  For example, look at the files produced by ...

     pdf(onefile=FALSE)
     example(layout)

... and at the help page for pdf() to see more about how to do this.

Hope that helps

Paul