Skip to content
Prev 1204 / 29559 Next

contourline as border between cells containing numbers and those containing NA of ASCII grid

On Fri, 28 Jul 2006, Jan Schwanbeck wrote:

            
Have a look at the plot.axes= argument for how to insert extra graphics 
into the plot:

library(maptools)
xx <- readShapePoly(system.file("shapes/sids.shp",
  package = "maptools")[1], IDvar = "FIPSNO",
  proj4string = CRS("+proj=longlat +ellps=clrk66"))
plot(xx)
bbox(xx)
x <- seq(-85,-75,1)
y <- seq(33,37,1)
xy <- expand.grid(x,y)
length(x)
length(y)
z <- matrix(runif(55), nrow=11)
filled.contour(x, y, z, asp=1)
filled.contour(x, y, z, asp=1, plot.axes={axis(1); axis(2); plot(xx, 
  add=TRUE)})

does seem to work.

Roger