Hi,

I thought the following would only remove the legend element of a
trellis object, but it actually removes both the legend and key
elements:

fig <- xyplot(Sepal.Length ~ Petal.Length, groups=Species, data=iris,
              key=list(x=1, y=0.02, corner=c(1, 0), size=3, between=1,
                text=list(levels(iris$Species))),
              legend=list(inside=list(fun="draw.key", x=0, y=1,
                            corner=c(0, 1),
                            args=list(key=list(text=list("a)", cex=1.5)),
                              draw=FALSE))))
update(fig, legend=NULL)

Is this the right way to remove an element from the object, using
update.trellis()?  Thanks.

Cheers,

-- 
Seb

______________________________________________
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