Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/r/78.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
R 将基本ggplot2地图与光栅图像相结合_R_Ggplot2_Mapping_Raster_Ggspatial - Fatal编程技术网

R 将基本ggplot2地图与光栅图像相结合

R 将基本ggplot2地图与光栅图像相结合,r,ggplot2,mapping,raster,ggspatial,R,Ggplot2,Mapping,Raster,Ggspatial,我试图制作一张基本的研究地点地图,在地图上标出我的研究地点,地图上还显示了当地的地形。 到目前为止,我已经使用RNaturalLearthData(我想)中的地图数据在ggplot2中创建了地图,并使用以下内容添加了我的研究站点: tas.map <- ggplot(data = world) + geom_sf() + theme_bw() + geom_point(data = tas.sites, aes(x = longitude, y = latitude), s

我试图制作一张基本的研究地点地图,在地图上标出我的研究地点,地图上还显示了当地的地形。 到目前为止,我已经使用RNaturalLearthData(我想)中的地图数据在ggplot2中创建了地图,并使用以下内容添加了我的研究站点:

tas.map <- ggplot(data = world) +
    geom_sf() +
  theme_bw() +
  geom_point(data = tas.sites, aes(x = longitude, y = latitude), size = 3, shape = 21, fill = "darkred") + 
  xlab("Longitude") + ylab("Latitude") +
  annotation_scale(location = "br", width_hint = 0.28) +
   coord_sf(xlim = c(146, 148.4), ylim = c(-43.8, -42.4), expand = FALSE)

plot(tas.map)
tas.map