plot_2dpcs: Plot 2D PCs

Description Usage Arguments Value Examples

Description

Convenience function for plotting shape PCs based on geomorph::plotRefToTarget(). Other than plotRefToTarget, magnitude of visualized difference in shape between reference face at average and low/high levels of the respective PC is based on standard deviations (instead of range).

Usage

1
2
3
4
5
6
7
8
plot_2dpcs(
  input,
  ref = NULL,
  which_pcs = 1:3,
  vis_sd = 3,
  print = TRUE,
  output = NULL
)

Arguments

input

Object of class facefuns, prcomp, gm.prcomp or PC_list (see make_pcs)

ref

Reference face. Defaults to sample average if input is facefuns object

which_pcs

Which PCs are to be created. Single number or vector, maximum allowed is 5

vis_sd

Extent of desired manipulation in units of standard deviation

print

Print plot

output

Specify file name/path to save plot

Value

Returns plot

Examples

1
2
3
4
data(LondonSet_aligned)
pca_output <- geomorph::gm.prcomp(LondonSet_aligned)
ref <- geomorph::mshape(LondonSet_aligned)
plot_2dpcs(pca_output, ref)

iholzleitner/facefuns documentation built on March 19, 2021, 2:43 p.m.