Skip to contents

coo_template returns shape centered on the origin and inscribed in a size-side square. coo_template_relatively does the same but the biggest shape (as prod(coo_diffrange)) will be of size=size and consequently not defined on single shapes.

Usage

coo_template(coo, size)

# S3 method for default
coo_template(coo, size = 1)

# S3 method for list
coo_template(coo, size = 1)

# S3 method for Coo
coo_template(coo, size = 1)

coo_template_relatively(coo, size = 1)

# S3 method for list
coo_template_relatively(coo, size = 1)

# S3 method for Coo
coo_template_relatively(coo, size = 1)

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.

Details

See coo_listpanel for an illustration of this function. The morphospaces functions also take profit of this function. May be useful to develop other graphical functions.

Examples


coo <- bot[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)