如何在R中绘制世界地图?

问题描述 投票:0回答:1

我的绘图目标是将光栅文件(.tif)绘制成世界地图。当我像这样使用 terra 绘制世界地图时 -

terra::plot(rnaturalearth::ne_countries(returnclass = "sf"))

但是,我想要这样的世界地图 -

terra::plot(rnaturalearth::ne_countries(returnclass = "sp"))

我知道 ggplot here 。但我想使用地形图,以便在现有绘图上添加新的栅格。

r geospatial
1个回答
0
投票

仅使用几何属性就能达到您想要的效果吗?

terra::plot(rnaturalearth::ne_countries(returnclass = "sf")["geometry"])
© www.soinside.com 2019 - 2024. All rights reserved.