library(ggplot2)
nc <- sf::st_read(system.file("shape/nc.shp", package = "sf"), quiet = TRUE)
ggplot(nc) +
geom_sf_inset() +
geom_inset_frame(
source.aes = list(fill = "red", alpha = 0.2, linewidth = 0),
target.aes = list(colour = "blue"),
lines.aes = list(linetype = 2, linewidth = 2)
) +
coord_sf_inset(inset = configure_inset(
shape_circle(centre = c(-82, 35), radius = 50),
scale = 5, translation = c(0, -260), units = "mi"
))
Run the code above in your browser using DataLab