请问怎么把地图中县市名的位置做微调?

楼主: zerone (yu)   2020-10-15 15:52:44
[问题类型]:
程式咨询
[软件熟悉度]:
入门
[问题叙述]:
向量地图的来源是GADM database
但是我发现到tm_text只能一次调整全部的地名,不能调整单一的,因为地图中嘉义县市的
名称太重叠
不太清楚还有什么指令可以单独修改地名的?
[程式范例]:
map123 <- qtm(map, fill = "asm_total", fill.title="ASM (%)", fill.palette="Green
s") + tm_layout(title = "Age-standardized mortality rate\nfor 0-29 year age grou
p in Taiwan", title.size = 1.0, title.position = c("left", "top")) + tm_text(tex
t = "en_NAME", size = 0.6, xmod = 0.2, ymod = -0.15)
https://i.imgur.com/JgOlQMd.png
[环境叙述]:
R version 4.0.2 (2020-06-22)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 17134)
Matrix products: default
locale:
[1] LC_COLLATE=Chinese (Traditional)_Taiwan.950
[2] LC_CTYPE=Chinese (Traditional)_Taiwan.950
[3] LC_MONETARY=Chinese (Traditional)_Taiwan.950
[4] LC_NUMERIC=C
[5] LC_TIME=Chinese (Traditional)_Taiwan.950
attached base packages:
[1] stats graphics grDevices utils datasets methods base
loaded via a namespace (and not attached):
[1] dplyr_1.0.2 crayon_1.3.4 grid_4.0.2 R6_2.4.1 lifecyc
le_0.2.0
[6] gtable_0.3.0 magrittr_1.5 scales_1.1.1 ggplot2_3.3.2 pillar_
1.4.6
[11] rlang_0.4.7 rstudioapi_0.11 generics_0.0.2 vctrs_0.3.4 ellipsi
s_0.3.1
[16] tools_4.0.2 glue_1.4.2 purrr_0.3.4 munsell_0.5.0 tinytex
_0.25
[21] xfun_0.16 compiler_4.0.2 pkgconfig_2.0.3 colorspace_1.4-1 tidysel
ect_1.1.0
[26] tibble_3.0.3
[关键字]:
tmap
作者: locka (locka)   2020-10-16 09:26:00
想到的方法是去修改原资料中嘉义县的座标,因为显示名称是打在每个polygon对应的座标位置

Links booklink

Contact Us: admin [ a t ] ucptt.com