小编kas*_*tka的帖子

操作图例中的“丢失”标签:tmap

我想操纵我的图例中的“失踪”标签。

图像1

我正在使用 R 中的 tmap 函数。我想将其更改为“缺少或不符合绅士化条件”

我尝试使用 tm_text 函数并考虑如何更改基础数据中的标签,但尚未找到解决方案。另请注意,代码使用映射函数。

########################
# categorical mapping function 
########################

cat.maps.wide.function <- function(data, varname, ltitle, colorplaette){
  tm_shape(data, unit = "mi") +
    tm_polygons(col = varname , # add variable(s)
                style = "cat", # set break pattern to object LQ.cuts
                palette = colorplaette,  # set color fill to blue refreshing
                border.col = "grey40", # color the borders white
                border.alpha = 0.5, # set border transparency
                title = ltitle, # title for legend
                colorNA = "white") + # …
Run Code Online (Sandbox Code Playgroud)

r legend tmap

7
推荐指数
1
解决办法
3709
查看次数

标签 统计

legend ×1

r ×1

tmap ×1