Learn R Programming

Momocs (version 0.1-01)

morph.sp: Plots the morphological space.

Description

Given a matrix of harmonic coefficients, a Nef-object, calculates and plots morphological space i.e. reconstructed shapes using and distributed on the orthonormal set defined by Principal Component axes.

Usage

morph.sp(Nef,
           PCa = 1, PCb = 2, nb.PCa = 5, nb.PCb = 6, fac = NA, 
           morph.sp.extend = 1, zoom.extend = 1.2, asp,
           pch = 20, shp.col = NA, shp.lwd = 1, shp.size, col = "grey40", 
		   ell = FALSE, r = 1, lwd = 1, title = "Morphological space")

Arguments

Nef
the Nef object
PCa
a numeric indicating the first Principal Component axis on which to reconstruct shape
PCb
a numeric indicating the second Pricipal Component axis on which to reconstruct shape
nb.PCa
a numeric indicating how many shape to reconstruct on the first PC axis considered
nb.PCb
a numeric indicating how many shape to reconstruct on the second PC axis considered
fac
a factor indicating the grouping desing
morph.sp.extend
integer how much to extend morphological space reconstruction beyond range on the first PC considered
zoom.extend
integer indicating how much to extend the graphical window
asp
numeric and optionnal indicating the asp of the plotting window
pch
integer or a character indicating the pch for each groups to plot
shp.col
integer or a character indicating the col of these shapes
shp.lwd
numeric indicating the lwd of these shapes borders
shp.size
numeric for fine-tuning of shapes size
col
integer or a character indicating the col for each confidence ellipse to plot
ell
logical indicating whether to draw confidence ellipses for every group
r
numeric indicating the number of standard deviation for confidence ellipses computation
lwd
numeric indicating the lwd for the confidence ellipses
title
character to change the title of the plot

Examples

Run this code
data(bottles.nef)
fac <- factor(rep(c("beer", "whisky"), each=20))

morph.sp(bottles.nef)
morph.sp(bottles.nef, fac=fac, ell=TRUE)
morph.sp(bottles.nef, fac=fac, nb.PCa=10, nb.PCb=10, ell=TRUE)
morph.sp(bottles.nef, PCa=2, PCb=3)

Run the code above in your browser using DataLab