Skip to content

creating a postscript file with two xyplots

5 messages · Dieter Menne, Liati, Duncan Mackay +1 more

#
Liati <liats80 <at> hotmail.com> writes:
library(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:

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

            
#
On 5/13/09, Liati <liats80 at hotmail.com> wrote:
Look at ?print.trellis and its examples.

-Deepayan