Full_Name: Craig A. McKinstry Version: 1.0.0 OS: WinNT4.0 and Win98 Submission from: (NULL) (192.101.100.130) When creating a multi-panel graphic, the command par(mfg=c(i,j,r,c)) is supposed to allow the user free movement between graphics panels to develop each panel separately. This works for the first invocation of par(mfg=c()) and for the first panel panel specified, but not for subsequent calls to the other panels. Coded example: x_1:20 y_1:20 #these 5 commands produce a 2x2 panel plot par(mfrow=c(2,2)) plot(x,y) plot(x,y) plot(x,y) plot(x,y) #the following 2 commands successfully added the text 'panel[2,1]' to panel[2,1] par(mfg=c(2,1,2,2)) text(10,10,'panel[2,1]') #None of the following 3 command-pairs produced their intended results for the other # 3 panels par(mfg=c(1,2,2,2)) text(10,10,'panel[1,2]') par(mfg=c(1,1,2,2)) text(10,10,'panel[1,1]') par(mfg=c(2,2,2,2)) text(10,10,'panel[2,2]') #However, the following command-pair did as intended on the first panel specified # by mfg=c(2,1,2,2) above par(mfg=c(2,1,2,2)) text(15,15,'panel[2,2]') #Running this in S-plus 4.0 produced the intended results -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-devel 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-devel-request@stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
Craig.Mckinstry@pnl.gov writes:> x_1:20 > y_1:20 > #these 5 commands produce a 2x2 panel plot > par(mfrow=c(2,2)) > plot(x,y) > plot(x,y) > plot(x,y) > plot(x,y) > > #the following 2 commands successfully added the text 'panel[2,1]' to > panel[2,1] > par(mfg=c(2,1,2,2)) > text(10,10,'panel[2,1]') > > #None of the following 3 command-pairs produced their intended results for the > other > # 3 panels > par(mfg=c(1,2,2,2)) > text(10,10,'panel[1,2]') > > par(mfg=c(1,1,2,2)) > text(10,10,'panel[1,1]') > > par(mfg=c(2,2,2,2)) > text(10,10,'panel[2,2]') > > #However, the following command-pair did as intended on the first panel > specified > # by mfg=c(2,1,2,2) above > par(mfg=c(2,1,2,2)) > text(15,15,'panel[2,2]')Same thing happens on Linux. Might be something with restoring the coordinate transformations. Using par(mfg=c(1,1,2,2)) plot(x,y) text(10,10,'panel[1,1]') *does* seem to work. -- O__ ---- Peter Dalgaard Blegdamsvej 3 c/ /'_ --- Dept. of Biostatistics 2200 Cph. N (*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918 ~~~~~~~~~~ - (p.dalgaard@biostat.ku.dk) FAX: (+45) 35327907 -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-devel 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-devel-request@stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._