Contour, levels, and surface plots

Contour plots are the multivariate plot type that is likely the most familiar to geographers.  In R, there are two kinds of contour plots, "2-D contour plots" in which contours are drawn on a standard set of scatter diagram axes, and levels plots that illustrate similar information by coloring or shading a grid of points on the 2-D space, and contouring is achieved visually.  All contour plots are constructed by selecting three variables.  There are additional ways of creating contour plots which will be discussed later.

2-D Contour plots

library(akima)
library(RColorBrewer)
attach(orstationc)
x.ctrl <- lon
y.ctrl <- lat
z.ctrl <- pann
interp.out <- interp(x.ctrl, y.ctrl, z.ctrl,
     xo= seq(-124.5000, -116.8333, .1667), yo= seq(42.0000, 46.1667, .0833))
image(interp.out, col=brewer.pal(8,"PuOr"))

contour(interp.out, xlab="", ylab="", add=T)
points(x.ctrl, y.ctrl)