Description Usage Arguments Examples
produces a choropleth plot for a SpatialPolygonsDataFrame
1 2 3 |
sp |
a SpatialPolygonsDataFrame |
color |
the variable to map to color (either the name in x or a vector) |
quantileBin |
should color be devided into quantile bins. If true, 5 bins are useds. alternatively quantileBin can be set to the number of desired bins |
palette |
A color scale (See the scales package) |
alpha |
transparency |
main |
title |
sub |
subtitle |
legend.loc |
legend location |
legend.title |
title |
add |
add to current plot |
border |
polygon border type |
... |
additional parameters for plot |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | ## Not run:
library(UScensus2000)
lat <- c(43.834526782236814,30.334953881988564)
lon <- c(-131.0888671875 ,-107.8857421875)
southwest <- openmap(c(lat[1],lon[1]),c(lat[2],lon[2]),5,'bing')
data(california.tract)
california.tract <- spTransform(california.tract,osm())
plot(southwest,removeMargin=TRUE)
spatialChoropleth(california.tract,'med.age',
legend.title = 'Median Age',alpha=1)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.