Closed hughjonesd closed 1 year ago
For a map:
library(ggplot2) library(ggmagnify) usa <- sf::st_as_sf(maps::map("state", fill=TRUE, plot =FALSE)) ggpm <- ggplot(usa) + geom_sf() + coord_sf(default_crs = sf::st_crs(4326), ylim = c(10, 50)) ggpm + geom_magnify(aes(from = ID %in% c("texas", "arizona")), to = c(-125, -98, 10, 30), shape = "outline", aspect = "fixed", expand = 0)
This could be fixed better by doing each polygon separately; but there'd probably need to be an option for that!
For a map: