On Tue, Sep 2, 2008 at 11:43 PM, Andreas Krause <[EMAIL PROTECTED]> wrote: > Deepayan, > > that is exactly what I was hoping for. Thanks much! > > Experimenting with it I noticed that updating two existing objects with plot > arguments seems to not work, at least not in this way: > > gr1 <-xyplot(rnorm(111) ~ runif(111), main = "Plot A") > gr2 <- xyplot(runif(111) ~ runif(111), main = "Plot B") > > plist <- list( > update(gr1, plot.args = list(position = c(0, 0, 1, 0.5), more = TRUE)), > update(gr2, plot.args = list(position = c(0, 0.5, 1, 1), more = FALSE)) > ) > > print(plist) > gives me two separate pages, even though the object is updated: > >> plist[[1]]$panel.args.common > $plot.args > $plot.args$position > [1] 0.0 0.0 1.0 0.5 > > $plot.args$more > [1] TRUE > > I can get it to work the "dirty" way: > plist[[1]]$plot.args <- list(position = c(0, 0, 1, 0.5), more = TRUE) > plist[[2]]$plot.args <- list(position = c(0, 0.5, 1, 1), more = FALSE) > > Shouldn't update work as well?
Yes, it should; but update() predates 'plot.args' etc. and wasn't updated; it treats 'plot.args' as an unrecognized argument and adds it to the list of panel function arguments. I'll fix this in the next release. -Deepayan ______________________________________________ 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.