data(columbus)
crime.f <- as.ordered(cut(columbus$CRIME,
breaks=quantile(columbus$CRIME, probs=seq(0,1,0.2)),
include.lowest=TRUE))
colours <- c("salmon1", "salmon2", "red3", "brown", "black")
plot(bbs[,1], bbs[,4], xlab="", ylab="", asp=1, type="n",
xlim=range(c(bbs[,1],bbs[,3])), ylim=range(c(bbs[,2],bbs[,4])))
for (i in 1:length(polys))
polygon(polys[[i]], col=colours[codes(crime.f[i])])
legend(x=c(5.8, 7.1), y=c(13, 14.5), legend=levels(crime.f),
fill=colours, bty="n")
title(main=paste("Columbus OH: residential burglaries and vehicle
thefts",
"per thousand households, 1980"))
Run the code above in your browser using DataLab