Re: [R] Help : trellis.device

About this list Date view Thread view Subject view Author view Attachment view

From: Chuck Cleland (ccleland@optonline.net)
Date: Tue 18 May 2004 - 23:05:16 EST


Message-id: <40AA0A0C.4090507@optonline.net>


   If you want to save both figures in the same file and if PDF is
acceptable, try this:

a <- c(1,10)
b <- c(1,10)
c <- c(2,20)
d <- c(2,20)
library(lattice) # require is design for use inside functions

pdf("test.pdf")
trellis.device(new = FALSE, col = TRUE, bg = "white")
plot(a,b)
plot(c,d)
dev.off()

hope this helps,

Chuck

??? wrote:
> I want to save plots. So I use the R as fallows :
> --------------------------------
> a <- c(1,10)
> b <- c(1,10)
> c <- c(2,20)
> d <- c(2,20)
> require(lattice)
> trellis.device("bmp", file = "test.bmp", bg = "white")
> print(plot(a,b))
> print(plot(c,d))
> dev.off()
> --------------------------------
>
> However, I got a image of plot(c,d).
> I want to get a image of plot(a,b) and plot(c,d).
>
> Can anyone suggest a solution?

-- 
Chuck Cleland, Ph.D.
NDRI, Inc.
71 West 23rd Street, 8th floor
New York, NY 10010
tel: (212) 845-4495 (Tu, Th)
tel: (732) 452-1424 (M, W, F)
fax: (917) 438-0894

______________________________________________ R-help@stat.math.ethz.ch mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


About this list Date view Thread view Subject view Author view Attachment view

This archive was generated by hypermail 2.1.3 : Mon 31 May 2004 - 23:05:11 EST