所以我目前有一张地图(非常难看,请参阅附件)
我找到了一种在俯视图上绘制它们的方法,但是我想附加不同的颜色并将其作为图例(并可能放大),而不是像第一个所示的那样在点的顶部加上字母图片。谁能帮我这个?这是理想的图片,但带有图例和不同的颜色:
“>
#libraries
library(readr)
library(sp)
library(rgdal)
library(raster)
library(GISTools)
library(sf)
#col_coor points to be plotted
SUB POP LON LAT
<chr> <chr> <dbl> <dbl>
1 mandtii AK -156. 71.2
2 ultimus NU -82.5 65.9
3 ultimus GR -70.2 76.5
4 arcticus LB -61.7 56.6
5 arcticus NF -53.6 47.3
6 arcticus ST -69.7 47.8
7 arcticus NS -61.5 45.1
8 arcticus NB -66.8 44.6
9 arcticus ME -68.2 44.2
10 islandicus IC -22.9 65.4
11 grylle FI 19.3 60.2
# Convert Lat & Lon data into a SPDF
col_loc <- sp::SpatialPointsDataFrame(col_coor[,3:4], col_coor)
# Assign a coordinate reference system
crs(col_loc) <- "+proj=longlat +datum=WGS84 +no_defs +ellps=WGS84 +towgs84=0,0,0"
radius <- 75000
ColBuff<-raster::buffer(col_loc, width=(radius), filename='1000', doEdge=FALSE)
# Plot maximum flight radius polygons on base raster with continent boundaries
data("wrld_simpl", package = "maptools")
world_map <- crop(wrld_simpl, extent(-180, 180, 35, 90))
plot(world_map, col="grey")
plot(ColBuff, pch=20, col="red",add=TRUE)
# Convert WGS84 to Arctic polar stereographic projection (STERE)
proj <- "+proj=stere +lat_0=90 +lat_ts=70 +lon_0=-45 +k=1 +x_0=0 +y_0=0 +a=6378273 +b=6356889.449 +units=m +no_defs"
wm_stere <- spTransform(world_map, CRSobj = CRS(proj))
plot(wm_stere, col="grey")
cb_stere <- spTransform(ColBuff, CRSobj = CRS(proj))
plot(cb_stere, pch=20, col="red",add=TRUE)
因此,我目前有一张地图(这很丑陋,请参见附件),我找到了一种在俯视图上绘制它们的方法,但是我想附加不同的颜色并将其作为图例(也许放大), ...
我不确定100%是否能理解您的问题,但您是否想创建类似的内容?