plotmap | R Documentation |
Plot levels of a variable in a colour-coded map.
plotmap( values, map, log = FALSE, nclr = 7, include.legend = TRUE, lwd = 0.5, round = 3, brks = NULL, legend = NULL, location = "topright", rev = FALSE )
values |
variable to plot |
map |
an object of class SpatialPolygons (See SpatialPolygons-class) |
log |
boolean of whether to plot values on log scale |
nclr |
number of colour-levels to use |
include.legend |
boolean of whether to include legend |
lwd |
line width of borders of areas |
round |
number of digits to round to in legend |
brks |
if desired, pre-specified breaks for legend |
legend |
if desired, a pre-specified legend |
location |
location of legend |
rev |
boolean of whether to reverse colour scheme (darker colours for smaller values) |
A map colour-coded to indicate the different levels of values
.
Albert Y. Kim
## Load data data(scotland) map <- scotland$spatial.polygon y <- scotland$data$cases E <- scotland$data$expected SMR <- y/E ## Plot SMR plotmap(SMR, map, nclr=9, location="topleft")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.