2
我有一個問題。當我使用ggmap繪製座標時,它不會根據日期列連接線段。我最終有一個奇怪的地圖。任何想法如何解決這個問題?感謝您的幫助提前。在ggmap中繪製GPS座標
這是做了什麼。
p=ggmap(mapImageData)+
geom_point(aes(x = Longitude, y = Latitude, group=DataID, color=factor(DataID)),
size = 4,
pch= 20,
data=koeco)
p + geom_line(aes(x = Longitude, y = Latitude, group=DataID, color=factor(DataID)),
size = 1,
data=koeco) +
theme_bw() +
annotate("text", x=110.3539, y=48.8, label = "Start",
colour = I("red"), size = 5) +
annotate("text", x=116.2648, y=28.5, label = "End",
colour = I("red"), size = 5) +
labs(x = "Longitude", y = "Latitude", colour = "Routes")
是的,它解決了這個問題。我的數據是按日期排序的。非常感謝。 – Nyamba