temptrap <- make.grid()
tempmask <- make.mask(temptrap)
covariates (tempmask) <- data.frame(circle =
exp(-(tempmask$x^2 + tempmask$y^2)/10000) )
tmpleg <- plot (tempmask, covariate = "circle", dots = FALSE,
breaks = 10, legend = FALSE)
strip.legend (xy = 'topright', col = terrain.colors(10),
legend = tmpleg, title = "Test plot")
## Not run: ------------------------------------
# ## a custom axis using the returned values
# par(mar = c(2,2,2,6))
# plot (tempmask, covariate = "circle", dots = FALSE,
# breaks = 10, legend = FALSE)
# b <- strip.legend (locator(1), col = terrain.colors(10),
# legendtype = "other", legend = " ", title = "Test plot",
# height = 0.3, box = NA)
# axis(side = 4, pos = b[2]+5, at = seq(b[4], b[3], length = 3),
# lab = seq(0,1,0.5), las = 1, tck = -0.02)
# par(mar = c(5,4,4,2) + 0.1) ## reset to default
#
## ---------------------------------------------
Run the code above in your browser using DataLab