Learn R Programming

geomorph (version 4.1.1)

plotspec: Plot 3D specimen, fixed landmarks and surface semilandmarks

Description

A function to plot three-dimensional (3D) specimen along with its landmarks.

Usage

plotspec(
  spec,
  digitspec,
  fixed = NULL,
  fixed.pt.col = "red",
  fixed.pt.size = 4,
  mesh.pt.col = "black",
  mesh.pt.size = 2,
  centered = FALSE,
  ...
)

Arguments

spec

An object of class shape3d/mesh3d, or matrix of 3D vertex coordinates.

digitspec

Name of data matrix containing 3D fixed and/or surface sliding coordinates.

fixed

Numeric The number of fixed template landmarks (listed first in digitspec)

fixed.pt.col

The color for plotting fixed template landmarks (if any)

fixed.pt.size

The size for plotting fixed template landmarks (if any)

mesh.pt.col

The color for plotting mesh template landmarks

mesh.pt.size

The size to plot the mesh template points

centered

Logical Whether the data matrix is in the surface mesh coordinate system (centered = "FALSE") or if the data were collected after the mesh was centered (centered = "TRUE")- see details.

...

additional parameters which will be passed

Author

Dean Adams, Antigoni Kaliontzopoulou, & Michael Collyer

Details

Function to plot 3D specimens along with their digitized "fixed" landmarks and semilandmarks "surface sliders" and "curve sliders". If specimen is a 3D surface (class shape3d/mesh3d) mesh is plotted. Data collected outside geomorph should likely be read using centered = "FALSE". 3D coordinate data collected using geomorph versions prior to build. 1.1-6 were centered by default, and thus use centered = "TRUE". The function assumes the fixed landmarks are listed at the beginning of the coordinate matrix (digitspec).

See Also

read.ply

Examples

Run this code
if (FALSE) {

 data(scallopPLY)
 ply <- scallopPLY$ply
 digitdat <- scallopPLY$coords
 plotspec(spec = ply, digitspec = digitdat, fixed = 16, 
 centered = TRUE, fixed.pt.col = "red", 
 fixed.pt.size = 15, col = "blue", size = 5)
 }

Run the code above in your browser using DataLab