Here is a reproducible example to work with:
library(lattice)
myimage<-matrix(c(1,1,2,3,3,4), nrow=3, ncol=2)
mytable<-data.frame(Xcoord=c(1.5, 1.5, 3,3), Ycoord=c(1,2,1,2), Labels=c("A","B","C","D"))
mycolors<-colorRampPalette(c("red","yellow","green","cyan","blue"))
windows()
levelplot(myimage, aspect="iso", col.regions = mycolors)
which produce the graph below.
Now I want to add (as text) the Labels
in mytable
at the specified coordinates indicated by Xcoord
& Ycoord
(which correspond to the rows and columns of the images). How can I do this ?