Hi, I was using xyplot and had problems in printing (on a postscript file) when there was a session like xyplot(....) par(new=T) xyplot(....) after a print the result is that the ps contains only he last xyplot! any obvious things to do? thanks Didier -- Didier G. Leibovici didier at fmrib.ox.ac.uk +44 (0)1865 222 739 Image Analysis Group fax:+44 (0)1865 222 717 Oxford University, Centre For Functional Magnetic Resonance Imaging of the Brain (FMRIB), John Radcliffe Hospital, Headington, Oxford OX3 9DU, U.K http://www.fmrib.ox.ac.uk/~didier/ -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
On Mon, Jun 25, 2001 at 04:53:17PM +0100, Didier Leibovici wrote:> Hi, > I was using xyplot > and had problems in printing (on a postscript file) > when there was > a session > like > xyplot(....) > par(new=T) > xyplot(....) > > after a print the result is that the ps contains only he last > xyplot! > any obvious things to do? > thanks > DidierAccording to Prof.Ripley it isn''t a good idea to copy a trellis.device to another device (eg printer). See the posting at the r-help archive. If you really want that you can xyplot(...,page=function(i)dev.print(...,file=paste("/tmp/tmp",i,".ps",sep=""))) see ?trellis.args. btw: Lattice is under development. 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
On Mon, 25 Jun 2001, Peter Malewski wrote:> On Mon, Jun 25, 2001 at 04:53:17PM +0100, Didier Leibovici wrote: > > Hi, > > I was using xyplot > > and had problems in printing (on a postscript file) > > when there was > > a session > > like > > xyplot(....) > > par(new=T) > > xyplot(....) > > > > after a print the result is that the ps contains only he last > > xyplot! > > any obvious things to do? > > thanks > > Didier > > According to Prof.Ripley it isn''t a good idea to copy a trellis.device > to another device (eg printer). See the posting at the r-help > archive.(Yes, but he is plotting on a postscript device).> If you really want that you can > > xyplot(...,page=function(i)dev.print(...,file=paste("/tmp/tmp",i,".ps",sep=""))) > > see ?trellis.args. > > btw: Lattice is under development.I think Didier''s probelm is mixing GRZ-style and trellis-style graphics. That is, par(new=T) does not do what he wants. If you want to print a Trellis plot (that is what you do), and then add another you need to use the `more'' argument to print.trellis. That is print(xyplot(....), more=T) xyplot(....) works in the original, and looks like it should work in lattice too. -- 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
Hi, as Prof Ripley points out, standard R graphics concepts might not work with grid/lattice. In particular, use of the par() function is not guaranteed to give desired results. Another feature of Trellis (hence lattice) graphics is that the paradigm of adding bits and pieces to an existing plot don''t work. For your particular example, it would be helpful to know what you are attempting to do. Superimposing two plots (which is what it seems you are trying to do) might be a bad idea. If you want to put more than one plot on the same page, try print.trellis() with more=T, along with either position= or split=. (See the help page for print.trellis for details and examples.) [Remember to start the postscript device by trellis.device() and not postscript().] On Mon, 25 Jun 2001, Didier Leibovici wrote:> Hi, > I was using xyplot > and find problems in printing (on a postscript file) > when there was > a session > like > xyplot(....) > par(new=T) > xyplot(....) > > basically the result is the ps contain only he last > xyplot! > any obvious things to do? > thanks > Didier > -- > Didier G. Leibovici didier at fmrib.ox.ac.uk +44 (0)1865 222 739 > Image Analysis Group fax:+44 (0)1865 222 717 > Oxford University, Centre For Functional Magnetic Resonance Imaging of > the Brain (FMRIB), John Radcliffe Hospital, Headington, Oxford OX3 9DU, > U.K > http://www.fmrib.ox.ac.uk/~didier/ >-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._