r - 如何在 R 包 tmap 中为专题图使用连续色标?
问题描述
当我制作一个tmap
连续变量映射到填充颜色的等值线时,将变量tmap
离散化并按类别绘制颜色。例如,这段代码
library(tmap)
data(World)
tm_shape(World) + tm_polygons(col="gdp_cap_est")
生成一张地图,其中国家根据其人均 GDP 是否在 0-20,000 美元、20,000-40,000 美元等范围内进行着色。我想要一张 GDP/人均连续映射到颜色或颜色阴影的地图,以便小GDP 的差异导致地图上颜色的微小差异。tmap 有这个能力吗?
解决方案
推荐阅读
- swift - Swift 4.2 中 Codility GenomicRangeQuery 的前缀 Sum Coding Challenge 的解释
- h2o - 如何解释 H2O 混淆矩阵的行和列
- c++ - OpenAL alDistanceModel 增益/衰减
- python - 如何在代码中获取 argparse 参数的子集
- liferay - Liferay 7.1:只有一个节点的集群(测试环境)
- yii - Yii2:选择下拉列表中的项目时设置文本字段的值
- javascript - HereMaps GeoJSON Polygon 点击阅读属性
- javascript - 无法在 ReactJS 中重用复选框功能
- sql - 删除双左连接中的重复项
- java - JUnit 测试以匹配 Sting/Words