Learn R Programming

prettymapr (version 0.2.5)

zoombbox: 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))

Value

A zoomed bounding box.

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.

Examples

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

Run the code above in your browser using DataLab