[R] problem with mfg argument of par

Ken Knoblauch knoblauch at lyon.inserm.fr
Sat Mar 17 12:11:01 CET 2007


I'm having a problem with the mfg option of par.  Am I making an error in my
usage?  Here is a simple example that I thought would plot to the 4 corners
of a 2x2 plot but doesn't plot to the lower right and plots twice on the
upper left.

par(mfrow = c(2, 2))
pos <- 	as.matrix(expand.grid(1:2, 1:2))
for (ix in 4:1) {
	par(mfg = pos[ix, ])
	plot(1:5)
	}

Thank you in advance.

R version 2.4.1 Patched (2007-01-23 r40561)
i386-apple-darwin8.8.1

locale:
C

attached base packages:
[1] "stats"     "graphics"  "grDevices" "utils"     "datasets"  "methods"
[7] "base"


-- 
Ken Knoblauch
Inserm U846
Institut Cellule Souche et Cerveau
Département Neurosciences Intégratives
18 avenue du Doyen Lépine
69500 Bron
France
tel: +33 (0)4 72 91 34 77
fax: +33 (0)4 72 91 34 61
portable: +33 (0)6 84 10 64 10
http://www.pizzerialesgemeaux.com/u846/



More information about the R-help mailing list