[R] Borders for rectangles in lattice plot key
Richard.Cotton at hsl.gov.uk
Richard.Cotton at hsl.gov.uk
Tue Dec 23 10:45:34 CET 2008
Hopefully an easy question. When drawing a rectangles in a lattice plot
key, how do you omit the black borders?
Here is an example adapted from one on the xyplot help page:
bar.cols <- c("red", "blue")
key.list <- list(
space="top",
rectangles=list(col=bar.cols),
text=list(c("foo", "bar"))
)
barchart(
yield ~ variety | site,
data = barley,
groups = year,
layout = c(1,6),
ylab = "Barley Yield (bushels/acre)",
scales = list(x = list(abbreviate = TRUE, minlength = 5)),
col=bar.cols,
border="transparent",
key=key.list
)
Notice the black borders around the rectangles in the key.
I checked to see if there was an undocumented border component for the
rectangles compoenent of key that I could set to "transparent" or FALSE,
but no luck. I also tried setting lwd=0 on the rectangle component but
that didn't change anything either.
Regards,
Richie.
Mathematical Sciences Unit
HSL
------------------------------------------------------------------------
ATTENTION:
This message contains privileged and confidential inform...{{dropped:20}}
More information about the R-help
mailing list