Showing posts with label spatial plot. Show all posts
Showing posts with label spatial plot. Show all posts

Sunday, April 14, 2013

RG#63: Spartial grid plot

require(sp)

data(meuse.grid)
# gridd the data
gridded(meuse.grid)=~x+y

meuse.grid$g = factor(sample(letters[1:5], 3103, replace=TRUE),levels=letters[1:10])


meuse.grid$f = factor(sample(letters[6:10], 3103, replace=TRUE),levels=letters[1:10])

spplot(meuse.grid, c("f","g"))

spplot(meuse.grid, c("f","g"), col.regions=bpy.colors(10))

 

RG#62: spartial buble plot


require(sp)

# data

data(meuse)
coordinates(meuse) <- c("x", "y") # promote to SpatialPointsDataFrame

bubble(meuse, "zinc", maxsize = 2.5, main = "zic concentrations (ppm)", key.entries = 2^(-1:4))