Skip to content
Prev 248782 / 398506 Next

text labels in Trellis plot

On Wed, Jan 26, 2011 at 4:24 PM, Markus Damian <m.damian at bristol.ac.uk> wrote:
You essentially want this example from the ?xyplot help page:

  states <- data.frame(state.x77,
                          state.name = dimnames(state.x77)[[1]],
                          state.region = state.region)
     xyplot(Murder ~ Population | state.region, data = states,
            groups = state.name,
            panel = function(x, y, subscripts, groups) {
                ltext(x = x, y = y, labels = groups[subscripts], cex=1,
                      fontfamily = "HersheySans")
            })

-Deepayan