We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to set the extent of a map based upon a single layer.
https://www.mm218.dev/posts/2023-10-31-map-context/index.html
The text was updated successfully, but these errors were encountered:
You can use a bbox to set the limits within coord_sf:
coord_sf
bbox <- st_bbox(johnston_obs) ggplot() + geom_sf(data = nc) + geom_sf(data = johnston_obs, color = "red") + coord_sf( xlim = c(bbox[["xmin"]], bbox[["xmax"]]), ylim = c(bbox[["ymin"]], bbox[["ymax"]]), )
Sorry, something went wrong.
No branches or pull requests
Mike Mahoney - Adding context to maps made with ggplot2
How to set the extent of a map based upon a single layer.
https://www.mm218.dev/posts/2023-10-31-map-context/index.html
The text was updated successfully, but these errors were encountered: