Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

deformGrid2d

visualise differences between two superimposed sets of 2D landmarks


Description

visualise differences between two superimposed sets of 2D landmarks by deforming a square grid based on a thin-plate spline interpolation

Usage

deformGrid2d(matrix, tarmatrix, ngrid = 0, lwd = 1, show = c(1:2),
  lines = TRUE, lcol = 1, col1 = 2, col2 = 3, pcaxis = FALSE,
  add = FALSE, wireframe = NULL, margin = 0.2, gridcol = "grey",
  cex1 = 1, cex2 = 1, ...)

Arguments

matrix

reference matrix containing 2D landmark coordinates or mesh of class "mesh3d"

tarmatrix

target matrix containing 2D landmark coordinates or mesh of class "mesh3d"

ngrid

number of grid lines to be plotted; ngrid=0 suppresses grid creation.

lwd

width of lines connecting landmarks.

show

integer (vector): if c(1:2) both configs will be plotted, show = 1 only plots the reference and show = 2 the target. plotted. Options are combinations of 1,2 and 3.

lines

logical: if TRUE, lines between landmarks will be plotted.

lcol

color of lines

col1

color of "matrix"

col2

color of "tarmat"

pcaxis

logical: align grid by shape's principal axes.

add

logical: if TRUE, output will be drawn on existing plot.

wireframe

list/vector containing row indices to be plotted as wireframe (see lineplot.)

margin

margin around the bounding box to draw the grid

gridcol

color of the grid

cex1

control size of points belonging to matrix

cex2

control size of points belonging to tarmatrix

...

additional parameters passed to plot

Author(s)

Stefan Schlager

See Also

Examples

if (require(shapes)) {
proc <- procSym(gorf.dat)
deformGrid2d(proc$mshape,proc$rotated[,,1],ngrid=5,pch=19)
}

Morpho

Calculations and Visualisations Related to Geometric Morphometrics

v2.8
GPL-2
Authors
Stefan Schlager [aut, cre, cph], Gregory Jefferis [ctb], Dryden Ian [cph]
Initial release
2020-02-26

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.