Hi, I would like to create one postscript file with two different xyplots (which use different datasets). Is there a (relitively easy) way to do this? Many thanks!!! Liat. -- View this message in context: http://www.nabble.com/creating-a-postscript-file-with-two-xyplots-tp23515202p23515202.html Sent from the R help mailing list archive at Nabble.com.
Liati <liats80 <at> hotmail.com> writes:> I would like to create one postscript file with two different xyplots (whichlibrary(lattice) postscript("myps.ps") xyplot(1~1,main="Plot 1") xyplot(2~3,main="Plot 2") dev.off() Dieter
Hi, Thank you for your reply. This is exactly what I have done. However, I would like to get the two plots next to each other (to use as one figure). At the moment the two plots are on two different pages. my ps is set as: postscript(file = "myRplot.ps",bg="transparent",pointsize=1.0, paper="special",width=8,height=8) Can it be that it has something to do with the size of the paper? Or is there some other parameter I need to set? Thank you!!! Liat. Dieter Menne wrote:> > Liati <liats80 <at> hotmail.com> writes: > >> I would like to create one postscript file with two different xyplots >> (which > > library(lattice) > postscript("myps.ps") > xyplot(1~1,main="Plot 1") > xyplot(2~3,main="Plot 2") > dev.off() > > Dieter > > ______________________________________________ > R-help at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide > http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. > >-- View this message in context: http://www.nabble.com/creating-a-postscript-file-with-two-xyplots-tp23515202p23532841.html Sent from the R help mailing list archive at Nabble.com.
Hi What you need to do is to specify where your plots are going on the page. This can depend on the graphics package used To start you going if you are using the base graphics:- plot etc see ?layout For lattice see ?viewports for a start. HTH Duncan Mackay Department of Agronomy and Soil Science University of New England ARMIDALE NSW 2351 Email home: mackay at northnet.com.au At 11:33 14/05/2009, you wrote:>Hi, >Thank you for your reply. >This is exactly what I have done. >However, I would like to get the two plots next to each other (to use as one >figure). >At the moment the two plots are on two different pages. >my ps is set as: > >postscript(file = "myRplot.ps",bg="transparent",pointsize=1.0, > paper="special",width=8,height=8) > >Can it be that it has something to do with the size of the paper? >Or is there some other parameter I need to set? >Thank you!!! >Liat. > > > > > >Dieter Menne wrote: > > > > Liati <liats80 <at> hotmail.com> writes: > > > >> I would like to create one postscript file with two different xyplots > >> (which > > > > library(lattice) > > postscript("myps.ps") > > xyplot(1~1,main="Plot 1") > > xyplot(2~3,main="Plot 2") > > dev.off() > > > > Dieter > > > > ______________________________________________ > > R-help at r-project.org mailing list > > https://stat.ethz.ch/mailman/listinfo/r-help > > PLEASE do read the posting guide > > http://www.R-project.org/posting-guide.html > > and provide commented, minimal, self-contained, reproducible code. > > > > > >-- >View this message in context: >http://www.nabble.com/creating-a-postscript-file-with-two-xyplots-tp23515202p23532841.html >Sent from the R help mailing list archive at Nabble.com. > >______________________________________________ >R-help at r-project.org mailing list >https://stat.ethz.ch/mailman/listinfo/r-help >PLEASE do read the posting guide http://www.R-project.org/posting-guide.html >and provide commented, minimal, self-contained, reproducible code.
On 5/13/09, Liati <liats80 at hotmail.com> wrote:> > Hi, > Thank you for your reply. > This is exactly what I have done. > However, I would like to get the two plots next to each other (to use as one > figure).Look at ?print.trellis and its examples. -Deepayan