One Question: if I make a lattice-plot (beware: under development!) with a special layout e.g. c(2,2,4): p1 <- xyplot(y~x|id,data=data,layout=c(2,2,3)) is there a way to print.trellis e.g. the second page of the trellis object "p1"? print.trellis(p1,page=2) #!wrong! I want this to automatically dev.print the pages (no, I don't want multiple postscript pages). If this isn't possible I'll do the old trick with a for-loop... Thanks Peter -- P.Malewski, Limmerstr.47, 30451 Hannover, 0511-2135008 At work: http://www.MH-Hannover.de 0511 532 3194 / Fax: 0511 532 3190, P.Malewski at tu-bs.de, peter.malewski at gmx.de, malewski.peter at mh-hannover.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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
Prof Brian Ripley
2001-Jun-01 14:16 UTC
[R] multiple lattice-pages (development package!)...
On Fri, 1 Jun 2001, Peter Malewski wrote:> One Question: if I make a lattice-plot (beware: under development!) with > a special layout e.g. c(2,2,4): > > p1 <- xyplot(y~x|id,data=data,layout=c(2,2,3)) > > is there a way to print.trellis e.g. the second page of the trellis > object "p1"? > > print.trellis(p1,page=2) #!wrong! > > > I want this to automatically dev.print the pages (no, I don't want multipleThat is *not* a good idea. Trellis plots should have defaults which depend on the device (I don't think lattice does yet) and so should not be copied between devices as dev.print does. Rather, just print to the device you want to use, or print multiply to multiple devices. As just one example, trellis uses cyan on grey on a screen, and blue (I think) on white on a paper device.> postscript pages). If this isn't possible I'll do the old trick > with a for-loop...There is no way to do this in Trellis, at least. -- Brian D. Ripley, ripley at stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272860 (secr) Oxford OX1 3TG, UK Fax: +44 1865 272595 -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
John Maindonald
2001-Jun-01 23:34 UTC
[R] multiple lattice-pages (development package!)...
Pter Malewski wrote> On Fri, Jun 01, 2001 at 03:49:50PM +0100, Prof Brian D Prof Brian DRipley wrote:> > That is *not* the same thing. It replaces one Trellis plot by a series > > of plots, and loses some of the overall calculations (for example of > > common scales).> Oh I haven't metioned that! In my case there is no much harm because > the plots that I'm currently making runs with > scales=list(relation="free")...> > BTW: when I said Trellis, I meant the original not lattice. > >> Is there a principal difference between lattice ans trellis except > that the grid functions are so diffend an thus the panel-functions?>From my brief look atthe lattice and grid libraries, it isremarkable is how similar lattice() is to trellis() its functions, while being very dissimilar underneath, mainly at the level of the functions in the grid library. This layering means that user code that is written for trellis, and which involves anything more than straightworward function calls, is unlikely to carry directly across to lattice. There are however large benefits in the grid/lattice separation of the code into layers. The grid library can be a basis for new graphics functions, or libraries, that greatly extend lattice, or do quite different things from lattice. The code in trellis is not layered in this way. A consequence is that it would be difficult and (perhaps even more importantly) generate some pretty contorted code, if one were to write another graphics library on top of trellis. Paul Murrell will probably think this so obvious that it is hardly worth saying, but maybe it needs to be said. John Maindonald email : john.maindonald at anu.edu.au Statistical Consulting Unit, phone : (6125)3998 c/o CMA, SMS, fax : (6125)5549 John Dedman Mathematical Sciences Building Australian National University Canberra ACT 0200 Australia -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
Peter Malewski
2001-Jun-02 17:12 UTC
[R] SOLVED: multiple lattice-pages (development package!)...
Not seen at first reading, there is one arg in trellis.args: page: a function of one argument (page number) to be called after drawing each page. so something like: xx <- data.frame(x=rnorm(100),y=rnorm(100),g=as.factor(round(rnorm(100)))) tmp <- 1 xyplot(y~x|g,data=xx,layout=c(1,1),page function(...){ dev.print(postscript ,file=paste("/tmp/test",tmp,".ps",sep="")) tmp <<- tmp + 1 } ) One big thank to the people, who provide "lattice" + "grid"! Peter -- P.Malewski, Limmerstr.47, 30451 Hannover, 0511-2135008 At work: http://www.MH-Hannover.de 0511 532 3194 / Fax: 0511 532 3190, P.Malewski at tu-bs.de, peter.malewski at gmx.de, malewski.peter at mh-hannover.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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
Peter Malewski
2001-Jun-02 17:35 UTC
[R] Re: SOLVED: multiple lattice-pages (development package!)...
On Sat, Jun 02, 2001 at 07:12:29PM +0200, Peter Malewski wrote: This:> tmp <<- tmp + 1is not nessary: xyplot(y~x|g,data=xx,layout=c(1,1,),page function(x){ dev.print(postscript ,file=paste("/tmp/test",x,".ps",sep="")) } ) -- P.Malewski, Limmerstr.47, 30451 Hannover, 0511-2135008 At work: http://www.MH-Hannover.de 0511 532 3194 / Fax: 0511 532 3190, P.Malewski at tu-bs.de, peter.malewski at gmx.de, malewski.peter at mh-hannover.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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._