Screws up when multiple polygons are magnified
hughjonesd opened this issue · comments
David Hugh-Jones commented
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)
David Hugh-Jones commented
This could be fixed better by doing each polygon separately; but there'd probably need to be an option for that!