get_transform: get_transform

View source: R/distribute.R

get_transformR Documentation

get_transform

Description

An internal function which calculates a set of transformations needed for a set of features and returns these transformation instructions as a data.frame with columns xshift, yshift for affine transforms, rotate for rotation transformations as an angle, plus xcellwidth, ycellheight for grid based methods to help find the cell heights and widths per feature.

Usage

get_transform(x, method = "regulargrid", ...)

Arguments

x

An sf-compatible feature layer, often containing polygons whose size is to be visually compared; REQUIRED.

method

Method used to distribute features; default and only functioning method is "regulargrid".

Other parameters used depend on the transformation method used.

direction

Direction of overall diagram, "row" fills each row first, "column" fills each column first; default "row".

cols

Number of columns of features to plot before moving onto next line if dir="v".

rows

Number of rows of features to plot before moving onto next line if dir="h".

margin

Scalar coefficient of spacing between features; default 1.1.

x.mar

Scalar coefficient of cell spacing on x axis, note that this is compounded on margin; default 1.

y.mar

Scalar coefficient of cell spacing on y axis, note that this is compounded on margin; default 1.

x.nudge

Additional spacing to add to x margins; default 0.

y.nudge

Additional spacing to add to y margins; default 0.


tcwilkinson/morphogram documentation built on Nov. 20, 2022, 3:45 a.m.