Getting a map with points, using ggmap and ggplot2

主宰稳场 提交于 2019-11-28 18:22:55

Your longitude and latitude values in geom_point() are in wrong order. lon should be as x values and lat as y values.

 p + geom_point(data=d, aes(x=lon, y=lat),size=5)

It seems you just inverted longitude and latitude :

p <- ggmap(Lille)
p + geom_point(data=d, aes(x=lon, y=lat), color="red", size=30, alpha=0.5)

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!