Learn R Programming

spinifex (version 0.2.5)

pan_zoom: Pan (offset) and zoom (scale) a 2 column matrix, dataframe or scaler number.

Description

Pan (offset) and zoom (scale) a 2 column matrix, dataframe or scaler number.

Usage

pan_zoom(x, x_offset = 0L, y_offset = 0L, scale = 1L)

Arguments

x

Numeric data object with 2 columns (or scaler) to scale and offset.

x_offset

Numeric value to pan in the x-direction.

y_offset

Numeric value to pan in the x-directionl

scale

Numeric value to scale/zoom the size for x.

Value

Scaled and offset x. A manual variant of set_axes_position().

See Also

set_axes_position for preset choices.

Examples

Run this code
# NOT RUN {
ib <- tourr::basis_init(6, 2)
pan_zoom(x = ib, x_offset = -1, y_offset = 0, scale = 2/3)
# }

Run the code above in your browser using DataLab