plotmorph: Plot Morphometric Data

View source: R/plot.R

plotmorphR Documentation

Plot Morphometric Data

Description

Creates scatter plots of morphometric measurements, with options for different dimension combinations and plotting of ratios.

Usage

plotmorph(
  data,
  dims = c(1, 2),
  plot.data = TRUE,
  ratios = FALSE,
  xlim = NULL,
  ylim = NULL,
  xlab = NULL,
  ylab = NULL
)

Arguments

data

A data frame containing the morphometric data. See the section below on the correct formatting of this argument.

dims

An integer vector of length two, indicating which dimensions will appear on the x- and y-axes, respectively.

plot.data

Logical. If FALSE, the plotting area is set up but points aren't plotted.

ratios

Logical. If TRUE, the y-axis represents the ratio between dimensions.

xlim, ylim

Limits for the axes.

xlab, ylab

Titles for the axes.

Value

No return value. Called to produce a plot.

The data argument

The manta object is an example of a correctly formatted data argument. It must be a data frame with the following columns:

animal.id

An individual identification number. Rows with the same animal.id correspond to measurements of the saime individual manta ray.

photo.id

A photo identification number. Rows with the same photo.id correspond to measurements taken from the same image.

photo.id

An integer indicating the dimension the measurement is for.

measurement

The corresponding measurement.

Examples

## Plotting dimensions 1 and 2.
plotmorph(manta)
## Plotting dimensions 1 and 3.
plotmorph(manta, dims = c(1, 3))
## Plotting the ratio of dimension 2 divided by dimension 1 on the
## y-axis.
plotmorph(manta, dims = c(1, 2), ratios = TRUE)


morphErr documentation built on Aug. 30, 2026, 5:06 p.m.