Skip to content
Prev 163587 / 398506 Next

legend idea for latticeExtra

On 12/2/08, baptiste auguie <ba208 at exeter.ac.uk> wrote:
The book has a similar example:

data(Chem97, package = "mlmRev")

## Figure 12.1
qqmath(~ gcsescore | factor(score), Chem97, groups = gender,
       f.value = function(n) ppoints(100),
       aspect = "xy",
       page = function(n) {
           cat("Click on plot to place legend", fill = TRUE)
           ll <- grid.locator(unit = "npc")
           if (!is.null(ll))
               draw.key(simpleKey(levels(factor(Chem97$gender))),
                        vp = viewport(x = ll$x, y = ll$y),
                        draw = TRUE)
       })

I will consider adding a version of this in latticeExtra (both this
and your example are not sufficiently general in their present form).

-Deepayan