Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
# Create base map
world_map <- ggplot() +
borders(fill = "grey40", colour = "black")
# Create titles
titles <- c("Deurmekaar", "Sequential", "Islands")
# Plotting function
plot_sites <- function(site_list, buffer, title_choice){
world_map +
geom_point(data = site_list, size = 6,
aes(x = lon, y = lat, colour = as.factor(order))) +
coord_cartesian(xlim = c(min(site_list$lon - buffer),
max(site_list$lon + buffer)),
ylim = c(min(site_list$lat - buffer),
max(site_list$lat + buffer))) +
labs(x = "", y = "", colour = "Site\norder") +
ggtitle(titles[title_choice])
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment