box_zoom: Zoom a ggplot to the bounding box of an sf object

View source: R/misc functions.R

box_zoomR Documentation

Zoom a ggplot to the bounding box of an sf object

Description

This function can be used with ggplot and uses an sf object to adjust the plotting window according to a bounding box. If you want more breathing space use st_buffer when providing 'sf'.

Usage

box_zoom(sf)

Arguments

sf

an sf object that you want to crop the plot window to

Value

Add to a ggplot with the standard '+' syntax to adjust the plotting window.


Jack-H-Laverick/MiMeMo.tools documentation built on March 6, 2023, 3:44 p.m.