When I make a choropleth with tmap
where a continuous variable is mapped to fill color, tmap
discretizes the variable and plots color by category. For example, this code
library(tmap)
data(World)
tm_shape(World) + tm_polygons(col="gdp_cap_est")
produces a map where countries are colored based on whether their GDP per capita is in the range $0-20,000, $20,000-40,000, etc. I would like a map where GDP/capita is mapped continuously to colors or shades of color, so that small differences in GDP entail small differences in color on the map. Does tmap have this capability?
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.