Description Usage Arguments Details Author(s) References See Also Examples
This function produces a graphical representation of selected principal component loadings of shape variables in the form of a heat map.
1 2 |
x |
a matrix containing the loadings of shape variables (row) of each principal component (column) |
pc |
a constant specifying the principal component of interest |
sgn |
the sign of the loadings; this value should follow the one used in |
nrow |
a constant indicating the number of landmarks defined in the anchors; defaults to 11 |
color.code |
a character vector of hex color codes that define the color palette; if left undefined, defaults to the red-white-blue palette |
ylab |
y-axis title for the plot |
xlab |
x-axis title for the plot |
yaxis |
if TRUE, the y-axis values are labelled |
tit |
title for the plot |
The sign and magnitude of loadings of shape variables for a particular principal component
is important for the latter's biological interpretation. A heat map representation is an alternative to
the usual manner of presenting them in tabular form, and may be more effective for presentation purpose.
Reference to the circular plots (plotCircular
) for each landmark and the PCA plots
can be very useful in determining the biological interpretation of a particular principal component.
Tsung Fei Khang tfkhang@um.edu.my
Khang TF, Soo OYM, Tan WB, Lim LHS. (2016). Monogenean anchor morphometry: systematic value, phylogenetic signal, and evolution. PeerJ 4:e1668.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | library(phytools)
data(ligophorus_shape)
data(ligotree)
data(spcolmap)
shapev <- pca2d(ligophorus_shape[,1:22], sgn=1, labcol=spcolmap$color,
phylo=TRUE, phy=ligotree, genus="L. ",
bound.y = c(-0.1, 0.1), bound.x1 =c(-0.15,0.2), bound.x2=c(-0.15,0.2))
fff <- c(0,1,1,2,2,3,3,0,4,4)
nf <- layout(matrix(c(rep(0,length(fff)),rep(fff,5),rep(0,length(fff))),
7,length(fff),byrow=TRUE))
layout.show(nf)
par(mar=c(5,4,4,1))
#the loadings for the first three PC of shape variables of the ventral anchors
pcloadhm(shapev$variable,sgn=1,pc=1,yaxis=TRUE,tit="VPC1")
pcloadhm(shapev$variable,sgn=1,pc=2,ylab="", tit="VPC2")
pcloadhm(shapev$variable,sgn=1,pc=3,ylab="", tit="VPC3")
#add a colorbar for completeness
par(mar=c(5,2,4,3))
colorBar(min=-1, max=1)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.