Draw curved lines in ggmap, geom_curve not working

為{幸葍}努か 提交于 2019-12-03 13:21:00
MLavoie

I think using coord_cartesian() give you what you want. Using the 5 rows showed in your post

map <- get_map(location = "Amsterdam", zoom = 11)
ggmap(map) +
  geom_point(data = df_vertices,
             aes(x = Longitude, y = Latitude, size = scaledkWh),
             colour = "red", alpha =0.5) +
 geom_curve(data = df,
            aes(x = Longitude_from, y = Latitude_from, xend = Longitude_to, yend = Latitude_to),    
            arrow = arrow(angle = 15, ends = "first", length = unit(0.5, "cm"), type = "closed"),
            size = df$scaledAmount, alpha = 0.5, curvature = 0.15, inherit.aes = TRUE)
scale_size_continuous(range=c(1,30)) +
coord_cartesian()

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