data(columbus)
brks <- round(quantile(columbus$CRIME, probs=seq(0,1,0.2)), digits=2)
colours <- c("salmon1", "salmon2", "red3", "brown", "black")
plotpolys(polys, bbs, col=colours[findInterval2(columbus$CRIME, brks)])
legend(x=c(5.8, 7.1), y=c(13, 14.5), legend=leglabs(brks),
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