[R] layout question

Martin Maechler maechler at stat.math.ethz.ch
Mon Sep 18 17:33:42 CEST 2000


>>>>> "Bill" == Bill Simpson <wsi at gcal.ac.uk> writes:

    Bill> Thanks Zoltan for your help.
    >> You may want to use this:
    >> 
    >> nf <- layout(matrix(c(0,1,1,0,2,2,3,3),4,2,byrow=T),respect=T)
    Bill> I tried this however and it gave 3 plots centred one above
    Bill> another.  Not what I wanted. (Also the bottom two had wrong
    Bill> aspect ratio: longer than wide)

Zoltan accidentally swapped rows and columns "4,2" should have been "2,4".
Matthew's rbind() syntax is nicer anyway.

However, I also think that "respect = TRUE" may not be what you want.
This finally gives something like

  nf <- layout(rbind(c(0,1,1,0), c(2,2,3,3)))
  for(i in 1:3) plot(1:10, main = i)

Martin Maechler <maechler at stat.math.ethz.ch>	http://stat.ethz.ch/~maechler/
Seminar fuer Statistik, ETH-Zentrum  LEO D10	Leonhardstr. 27
ETH (Federal Inst. Technology)	8092 Zurich	SWITZERLAND
phone: x-41-1-632-3408		fax: ...-1228			<><
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list