[R] update'ing trellis object
Sebastian P. Luque
spluque at gmail.com
Sun Oct 4 01:05:55 CEST 2009
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:
---<--------------------cut here---------------start------------------->---
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)
---<--------------------cut here---------------end--------------------->---
Is this the right way to remove an element from the object, using
update.trellis()? Thanks.
Cheers,
--
Seb
More information about the R-help
mailing list