Plotting static base map underneath a sf object
问题 I'm trying to plot a static base map underneath my sf object (for print). When using ggmap I first get a lot of errors, then I can't seem to figure out how to chain the base map to my ggplot2 object with a geom_sf . library(sf) # devtools::install_github("tidyverse/ggplot2") library(ggplot2) library(ggmap) nc <- st_read(system.file("shape/nc.shp", package="sf")) nc_map <- get_map(location = "North Carolina, NC", zoom = 7) ggmap(nc_map) nc_centers <- st_centroid(nc) nc_centers %>% ggplot() +