I would like to add different text to each panel in xyplot in lattice.
res<- xyplot(CumSpec ~ CumTotal | Site, data=data1, index.cond=list(c(1,2,3)),layout = c(3,1,1), aspect = 1,
axis=axis.overlap, origin=0, xlab="Total number of individuals", ylab="Total number of species",
between = list(x = 0),
scales=list(tick.number = 8, cex = .9, x=list(alternating=1), x=list(rot=90)),
par.settings = my.settings,
par.strip.text=list(col="white", font=2),
panel = function(x, y) {
panel.xyplot(x, y)
panel.abline(lm(y ~ x), lwd = 0.5, lty=2)
panel.text(400, 4.6, label="R=0.334", font=1)
})
res
I have tried to use panel.text but it adds the label to every panel. Does anyone know how to achieve this, please? your help would be appreciated.