【发布时间】:2020-07-29 16:17:41
【问题描述】:
我已经绘制了砂拉越州(在马来西亚国家)的地图以及地区级别的边界,如图所示。
但是我的问题是,如何为特定区域(两个或更多)着色?谁能帮助我,砂拉越的任何地区都可以作为例子。代码如下:
#sarawak map with divisions
library(raster)
#country Malaysia with all boundaries at the district level
Malaysia <- getData('GADM', country='MYS', level=2)
#listing all districts in every states in Malaysia e.g. there are 32 districts for Sarawak state
Malaysia$NAME_1
#plotting Sarawak with all districts and their boundaries
Sarawak <- Malaysia[98:128,]
plot(Sarawak)
【问题讨论】: