Hi,

I would like to create a custom key for a lattice xyplot in which line elements are displayed on top of rectangle elements. In the example code below, the lines and rectangles are shown side by side (the legend itself is meaningless, but that is not the point). Is there a way to overlay these key elements (but not the text)?

Thanks

xyplot(Sepal.Length + Sepal.Width ~ Petal.Length + Petal.Width,
  iris,
  type = c("p", "r"),
  jitter.x = TRUE,
  jitter.y = TRUE,
  factor = 5,
  key = list(
    column=4,
    text=list(lab=letters[1:4]),
    lines=list(col=1:4, pch=1:4, type='b'),
    rectangles=list(col=1:4, alpha=0.25, border=FALSE)
  )
)

______________________________________________
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
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