When I create a lattice/Trellis type graph, I typically write a function that 
returns the graph, as in
do.graph <- function(x, y, ...)
  {
    require(lattice)
    return(xyplot(y~x, ...))
  }

My question today is this: 
If I want two graphs on one page, one way of achieving it is to print the 
objects into defined areas, as in

gr1 <- xyplot(rnorm(111) ~ runif(111))
gr2 <- xyplot(runif(111) ~ runif(111))
print(gr1, pos=c(0, 0, 1, 0.5), more=T)
print(gr2, pos=c(0, 0.5, 1, 1), more=F)

Instead of using the print method, can I create a single trellis object that 
contains those two "sub-graphs"?
I do not think so, given what I know about the design of these objects. 
I am hoping for a pleasant surprise though.

   Andreas

______________________________________________
R-help@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.

Reply via email to