![](/img/trans.png)
[英]How to use a continuous color scale for thematic maps in the R package tmap?
[英]how to manually change continuous scale color in tmap in R
使用tmaptools::palette_explorer()
找到正確的調色板。
palette = "RdBu"
是最合適的。
data(World)
World$gdp_cap_est2 <- World$gdp_cap_est -100000
tm_shape(World) + tm_polygons(col="gdp_cap_est2",
style = "cont",
palette = "RdBu")
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.