我的绘图目标是将光栅文件(.tif)绘制成世界地图。当我像这样使用 terra 绘制世界地图时 -
terra::plot(rnaturalearth::ne_countries(returnclass = "sf"))
但是,我想要这样的世界地图 -
terra::plot(rnaturalearth::ne_countries(returnclass = "sp"))
我知道 ggplot here 。但我想使用地形图,以便在现有绘图上添加新的栅格。
仅使用几何属性就能达到您想要的效果吗?
terra::plot(rnaturalearth::ne_countries(returnclass = "sf")["geometry"])