chondro$z <- factor (rep (c("a", "a", "d", "c"),
length.out = nrow (chondro)),
levels = letters [1 : 4])
str (trellis.factor.key (chondro$z))
plotmap (chondro, z ~ x * y)
## switch off using trellis.factor.key:
## note that the factor levels are collapsed to c(1, 2, 3) rather than
## c (1, 3, 4)
plotmap (chondro, z ~ x * y, transform.factor = FALSE)
plotmap (chondro, z ~ x * y,
col.regions = c ("gray", "red", "blue", "dark green"))
Run the code above in your browser using DataLab