Frank E Harrell Jr
2002-Sep-15 17:37 UTC
[R] lattice with print(..., more=) and multiple graphics files
Under platform i586-pc-linux-gnu arch i586 os linux-gnu system i586, linux-gnu status major 1 minor 5.0 year 2002 month 04 day 29 language R (haven't updated to 1.5.1 because it's not available on Mandrake 8.1 which is on my home machine) using lattice 0.5-4 and grid 0.6-1 I am having difficulty getting 3 pdf files produced. The following code only produces 2 files, test1.pdf and test2.pdf: trellis.device('pdf',file='test%d.pdf',onefile=FALSE) p1 <- xyplot(runif(20) ~ runif(20)) p2 <- p1 for(i in 1:3) { print(p1,split=c(1,1,2,1),more=TRUE) print(p2,split=c(2,1,2,1),more=FALSE) } dev.off() Thanks in advance for any help. Frank -- Frank E Harrell Jr Prof. of Biostatistics & Statistics Div. of Biostatistics & Epidem. Dept. of Health Evaluation Sciences U. Virginia School of Medicine http://hesweb1.med.virginia.edu/biostat -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
Dieter Menne
2002-Sep-16 06:28 UTC
[R] lattice with print(..., more=) and multiple graphics files
Frank Harrel wrote: using lattice 0.5-4 and grid 0.6-1 I am having difficulty getting 3 pdf files produced. The following code only produces 2 files, test1.pdf and test2.pdf: trellis.device('pdf',file='test%d.pdf',onefile=FALSE) p1 <- xyplot(runif(20) ~ runif(20)) p2 <- p1 for(i in 1:3) { print(p1,split=c(1,1,2,1),more=TRUE) print(p2,split=c(2,1,2,1),more=FALSE) } dev.off() ------------ A similar, but less visible problem with trellis.device('postscript',file='test%d.ps',onefile=FALSE) Three file are generated, but only the first one is valid. test2 and test3 have "%% of pages does not match..." Dieter platform i386-pc-mingw32 arch i386 os mingw32 system i386, mingw32 status major 1 minor 5.1 year 2002 month 06 day 17 language R --------------------------------------- Dr. Dieter Menne Biomed Software 72074 T?bingen Tel (49) (7071) 52176 FAX (49) (7071) 55 10 46 dieter.menne at menne-biomed.de www.menne-biomed.de -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._