Chapter 11: Code and Figures

R Code

All verbatim chunk codes used in the Chapter are available in dismap.R


Figure 11.4

Click on figure to go back to Chapter gallery. Please see preceeding chunks for values not set in this chunk (dismap-017.R).

colorkey<-list(labels=as.character(c(formatC(brks, format="f", dig=2))),
  at=atcol,  height=.5)

cols <- grey.colors(5, 0.95, 0.45, 2.2)

print(spplot(nc, c("SMR","EBPG", "EBLN", "EBMarshall"), col.regions=cols, 
  at=brks, axes = TRUE, colorkey=colorkey))