【发布时间】:2018-06-08 16:47:34
【问题描述】:
几行代码就暴露了我的问题。当我使用地图时 世界和我介绍一个投影,我总是以一些结束 奇怪的水平线。 请看一下 https://www.rdocumentation.org/packages/ggplot2/versions/1.0.0/topics/coord_map
我以新西兰为例
library(ggplot2)
nz <- map_data("nz")
# Prepare a map of NZ
nzmap <- ggplot(nz, aes(x = long, y = lat, group = group)) +
geom_polygon(fill = "white", colour = "black")
# Plot it in cartesian coordinates
nzmap
# With correct mercator projection
nzmap + coord_map()
效果很好。现在让我们对世界做同样的事情
world <- map_data("world")
# Prepare a map of the world
worldmap <- ggplot(world, aes(x = long, y = lat, group = group)) +
geom_polygon(fill = "white", colour = "black")
# Plot it in cartesian coordinates
worldmap
##but the following is a disaster!
# With correct mercator projection
worldmap + coord_map()
我看到这个带有投影的水平线的问题已经 持续了很长一段时间,但我只能找到经验丰富的帖子 我以为这是很久以前修复的。 请在我的 sessionInfo 下方找到。 有什么解决办法吗?它仍然是一个开放的错误吗?
【问题讨论】:
-
请张贴图片。此外,该链接不能使用 https://,因为它的证书无效。
-
根据this GitHub issue 的说法,这是一个已知问题,但没有计划修复它,因为创作者更愿意转向更好的数据来源