我正在尝试在R地图中绘制国家/地区。但是,当我使用FILL = TRUE时,我所有的国家边界都是黑色的。我想要他们在格雷。这是我的代码:
library(maps) # Provides functions that let us plot the maps
library(mapdata) # Contains the hi-resolution points that mark out the Cnt
countries=c("Argentina","Armenia","Australia","Bahrain","Belgium","Botswana","Bulgaria","Canada", "Chile","Tawain", "Croatia","Cyprus", "Czech Republic", "Denmark","Egypt","UK:Great Britain","Finland", "France", "Georgia", "Germany", "China:Hong Kong", "Hungary", "Indonesia", "Iran", "Ireland", "Israel", "Italy", "Japan", "Jordan", "Kazakhstan", "Korea", "Kuwait", "Lebanon", "Lithuania", "Malaysia", "Malta", "Morocco", "Netherlands", "New Zealand", "UK:Northern Ireland", "Norway", "Oman", "Palestine", "Poland", "Portugal", "Qatar", "Russia", "Saudi Arabia", "Serbia", "Singapore", "Slovak Republic", "Slovenia", "South Africa", "Spain", "Sweden", "Thailand", "Turkey", "United Arab Emirates", "USA")
map('world', resolution=1, col="darkgray")
map('world', countries, resolution=1, fill = T, col = "royalblue", add = T)
map('world', resolution=1,col="darkgray", add=TRUE)
任何想法都将受到赞赏。
由于 Jº
答案 0 :(得分:0)
要更改边界的颜色,请添加参数border =' darkgrey'。此参数未在地图'地图'的手册页中明确列出。因为它实际上是调用“多边形”的参数。在' ...'中提到了它。但是,手册页的一部分。
map('world', countries, resolution=1, fill = T,
col = "royalblue", border="darkgrey", add = T)