zoombbox: Zoom the extents of a bounding box

View source: R/bboxtools.R

zoombboxR Documentation

Zoom the extents of a bounding box

Description

Manipulate the extents of a bounding box by zooming and moving an existing bbox. This is helpful when manipulating the extents of a plot created by canvec.qplot()

Usage

zoombbox(bbox, factor = 1, offset = c(0, 0))

Arguments

bbox

An existing bbox

factor

A factor to zoom by. >1 will zoom in, <1 will zoom out. If a vector is passed, the first element will zoom the X extent, the second element will zoom the Y extent.

offset

A vector describing the X and Y offset that should be applied.

Value

A zoomed bounding box.

Examples

box1 <- makebbox(45, -64, 44, -65)
zoombbox(box1, c(.2,.5))


prettymapr documentation built on June 9, 2022, 5:09 p.m.