Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- library(lattice)
- library(latticeExtra)
- library(grid)
- xyplot(Sepal.Width ~ Sepal.Length, groups = Species, data = iris, cex = 1.5,
- key = list(space = "top", columns = 3, text = list(levels(iris$Species)),
- points = list(cex = 1.5, pch=16,col=ggplot2like(n = 3)$superpose.symbol$col)),
- par.settings = ggplot2like(n = 3),
- lattice.options = ggplot2like.opts()) +
- layer(panel.abline(a = -0.2,b = 0.7, col=1, lwd=2)) +
- layer(panel.abline(a = -0.3,b = 0.6, col=2, lwd=2))
- draw.key(list(columns = 2, text = list(paste("Line", 1:2)),
- lines = list(lwd=2,col=1:2)), draw = TRUE, vp = viewport(.5, .93))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement