Learn R Programming

Momocs (version 0.2-6)

coo.template: "Templates" list and matrix of coordinates.

Description

coo.template returns coo so that the shape it is centered on the origin and inscribed in a size-side square, also centered on the origin; see coo.list.panel for an illustration of this function.

Usage

coo.template(coo, size)

Arguments

coo
A list or a matrix of coordinates.
size
numeric. Indicates the length of the side "inscribing" the shape.

Value

  • Returns a matrix of (x; y)coordinates.

See Also

coo.list.panel.

Examples

Run this code
data(bot)
coo <- bot@coo[[1]]
coo.plot(coo.template(coo), xlim=c(-1, 1), ylim=c(-1, 1))
rect(-0.5, -0.5, 0.5, 0.5)

s <- 0.01
coo.plot(coo.template(coo, s))
rect(-s/2, -s/2, s/2, s/2)

Run the code above in your browser using DataLab