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

Frank E Harrell Jr fharrell at virginia.edu
Mon Sep 16 12:44:26 CEST 2002


On Mon, 16 Sep 2002 08:28:01 +0200
Dieter Menne <dieter.menne at menne-biomed.de> wrote:

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

Dieter - I don't know about the invalid pages with postscript( ) and trellis.device( ) but Paul Murrell reported to me that there is a bug in pdf( ) which prevents it from making more than 2 pages of output.  This bug is being fixed in R 1.6.

Frank Harrell
-- 
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