#Image and contour plots (These are Oooh-Ahhh plots) data(volcano) x <- 10 * (1:nrow(volcano)) x.at <- seq(100, 800, by = 100) y <- 10 * (1:ncol(volcano)) y.at <- seq(100, 600, by = 100) image(x, y, volcano, col = terrain.colors(100), axes = FALSE) rx <- range(x <- 10*1:nrow(volcano)) ry <- range(y <- 10*1:ncol(volcano)) ry <- ry + c(-1,1) * (diff(rx) - diff(ry))/2 tcol <- terrain.colors(12) par(mfrow=c(1,1)) opar <- par(pty = "s", bg = "lightcyan") plot(x = 0, y = 0,type = "n", xlim = rx, ylim = ry, xlab = "", ylab = "") u <- par("usr") rect(u[1], u[3], u[2], u[4], col = tcol[8], border = "red") contour(x, y, volcano, col = tcol[2], lty = "solid", add = TRUE) title("A Topographic Map of Maunga Whau", font = 4) abline(h = 200*0:4, v = 200*0:4, col = "lightgray", lty = 2, lwd = 0.1)