# NOT RUN {
data(squirreloc)
## habitat:
are <- squirreloc$map
co <- attr(are, "info")
plot(are, colp = co[,2])
legend(-10, 210, unique(co[,1]),
unique(co[,2]), bg="white")
## relocations
locs <- squirreloc$locs
li <- split(locs[,2:3], locs[,1])
opar <- par(mfrow=n2mfrow(length(li)), mar=c(0,0,2,0))
lapply(1:length(li), function(i) {
plot(are, colp = co[,2], main=names(li)[i], axes=FALSE)
points(li[[i]], pch=16, cex=1.5)
box()
})
par(opar)
# }
Run the code above in your browser using DataLab