[R] lattice with print(..., more=) and multiple graphics files

Frank E Harrell Jr fharrell at virginia.edu
Sun Sep 15 19:37:13 CEST 2002


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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list