小编Mic*_*mpf的帖子

如何在 ggplot2 中绘制旋转地图的矩形图像?

我首先承认这是我在 Stack Overflow 上的第一篇文章,所以如果我错过了一些更好的观点,我深表歉意。

我正在使用海岸线的矢量 shapefile 在 ggplot2 中创建一系列南极半岛地图。创建基本地图工作正常:

library(ggplot2)
library(rgdal)

# Import shapefile
peninsula <- readOGR(dsn = "C:/filepath", layer = "filename")
peninsula <- fortify(peninsula)

basic <- ggplot() +
  geom_polygon(data = peninsula, aes(x = long, y = lat, group = group),
               color = "gray30", size = 0.25, fill = "gray30", alpha = 0.8) +
  theme(panel.background = element_rect(fill = "black"),
        panel.grid.major = element_line(colour = "white", linetype = "dotted")) +
  coord_map(project="stereographic", orientation=c(-90,-55,0),
            ylim = c(-68, -60), xlim = c(-70, -42)) +
  labs(x …
Run Code Online (Sandbox Code Playgroud)

mapping r projection ggplot2

5
推荐指数
0
解决办法
447
查看次数

标签 统计

ggplot2 ×1

mapping ×1

projection ×1

r ×1