[R] par(mfrow,mai) and multiple plot problem

Robin Hankin r.hankin at noc.soton.ac.uk
Mon Jul 10 12:41:38 CEST 2006


[apologies for possible multiple posting]

Hi Joris

great suggestion!  I never thought to use layout() in this way.


If I have

postscript(file="~/f.ps",width=5,height=8)

nf <- layout(matrix(
                     c(00,01,00,02,00,03,
                       04,05,00,06,00,07,
                       00,00,00,00,00,00,
                       08,09,00,10,00,11,
                       00,00,00,00,00,00,
                       12,13,00,14,00,15,
                       00,00,00,00,00,00,
                       16,17,00,18,00,19),8,6,byrow=TRUE), c(1,4,  
1,4, 1,4), c(1,4,1,4,1,4,1,4), TRUE)

layout.show(nf)
dev.off()

This is exactly what I want.

I hadn't appreciated that the empty rows and columns would be clear.

How best to put text in boxes 1,2,3 (that used to be main() and  
vertical text in
boxes 4,8,12,16 (that used to be ylab)?

best wishes

Robin



On 10 Jul 2006, at 10:27, Joris De Wolf wrote:

> Check
> ?layout
>
> It gives you more flexibility than
> par(mfrow=c(a,b))
>
> For instance, you can define your margins between the graphs as  
> cells in the layout without filling them by a plot.
>
> Joris
>
>
> Robin Hankin wrote:
>> Hi
>> I'm having difficulty with a multiple plot.

--
Robin Hankin
Uncertainty Analyst
National Oceanography Centre, Southampton
European Way, Southampton SO14 3ZH, UK
  tel  023-8059-7743



More information about the R-help mailing list