I am trying to plot distribution points of a species over a map using R and ggmaps. I followed slightly modified instructions of an other stackoverflow question: R geom_point and ggmap However, it does not work.
My example data is saved in a cvs-file and I call it Coords.
Subspecies lon lat
Caryo 46.06667 7.600000
Macro 56.50000 84.966667
Caryo 46.91833 13.873611
My script is as followed:
distmap <- get_map(location = 'eurasia', zoom = 3, source = 'google', maptype = "terrain")
ggmap(distmap)
Coods <- read.csv2("Coords.csv")
Dist <- ggmap(distmap) + geom_point(data=Coords, aes(x=lon, y=lat),color = "red", size = 4)
I know have three problems:
The cutting of the map is too small, however, if I use a zoom of 2, it does not plot the map, but only a gray background with lat and lon on the sides.
At the end of my sript, it does not plot any points on my map.
I want to have the points in different colours, depending on subspecies.
Any ideas?