Skip to content
Prev 323368 / 398503 Next

A problem of splitting the right screen in 3 or more independent vertical boxes:

For those that may have this question in the future, here are two solutions:
As suggested from David and Sarah,
One has to remove par function from defining screen splits, instead use 
layout function.
For example:
  layout(matrix(c(1,1,2,3),2,2,byrow=T))
which says, split the screen in 4 blocks, of them use block space 1 and 
2 oriented by row for picture 1, and the two remaining blocks for 
picture 2 and picture 3. Similarly, one can split the screen into 6, 8 
blocks and so on by changing also how many blocks of space you want to 
assign to a specific picture for example.
layout(matrix(c(1,1,1,2,3,4,5),2,3,byrow=T)) ## six splits, of those 
first 3 belong to picture 1
layout(matrix(c(1,1,2,3,4,5,6,7),2,4,byrow=T))  ## 8 splits of those 
first 2 belong to picture 1 and so on.

Dennis Murphey provided also another beautiful solution via ggplot2. See 
following.
Thank you,
Aldi
On 5/3/2013 7:57 PM, Dennis Murphy wrote:

        
On 5/3/2013 6:07 PM, David Winsemius wrote: