A simple example of what I hope would work:
library(lattice)
xyplot(1~1,
key=list(
text=list( c("a", "b") ),
points=list(pch=21, fill=c("red", "blue")) ## note pch=21 => filled circle
)
)
One would expect the points being used in the legend would be filled red, but this doesn't seem to be the case. As a parallel, this code works as expected:
xyplot(1~1,
key=list(
text=list( c("a", "b") ),
points=list(pch=21, col=c("red", "blue"))
)
)
Any ideas how I can force lattice to use a specific fill for the legend points?