Description Usage Arguments Details Author(s) References Examples
This function creates a scatter plot that is augmented with marginal histograms (with smoothed splines) on the x and y-axes.
1 2 3 4 |
dat |
a matrix with rows representing species samples and two columns representing the variables of interest (typically a selected principal component of size and shape variables) |
seqx |
range of values on the x-axis, for histogram plotting |
seqy |
range of values on the y-axis, for histogram plotting |
ybound |
range of values on the y-axis |
xbound |
range of values on the x-axis |
y.label |
title for y-axis |
x.label |
title for x-axis |
labcol |
a character vector giving the color annotation for species names in alphabetical order |
type |
a character that controls where the marginal histograms are located: right-up ("ru"), left-up ("lu"), left-down ("ld"), right-down ("rd") |
sep1 |
tick mark separation for x-axis |
sep2 |
tick mark separation for y-axis |
phylo |
if TRUE, the centroids of species are joined into a tree-like object corresponding to their phylogeny given in |
phy |
a tree object of class |
pointscale |
a constant specifying the symbol size of the centroids |
supp.hist.y |
if TRUE, suppresses the plotting of marginal histogram at the y-axis |
supp.hist.x |
if TRUE, suppresses the plotting of marginal histogram at the x-axis |
y.axis.label |
if FALSE, suppresses the y-axis title |
x.axis.label |
if FALSE, suppresses the x-axis title |
addline |
an optional numeric vector of length two specifying the intercept and slope of linear line |
This function is similar to tpColorPlot2d
, and is mainly useful for its additional
option for visualising the marginal distributions. The ape
and phytools
packages are required.
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.
Paradis E, Claude J & Strimmer K. (2004). APE: analyses of phylogenetics and evolution in R language. Bioinformatics 20: 289-290.
Revell LJ. (2012). phytools: An R package for phylogenetic comparative biology (and other things). Methods in Ecology and Evolution 3:217-223.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | library(phytools)
data(pwed_pd)
data(ligotree)
data(spcolmap)
#principal component analysis of size variables from ventral and dorsal anchors
pca2d_pwedv <- pca2d(pwed_pd[,1:55], sgn=-1, labcol=spcolmap$color,
phylo=TRUE, phy=ligotree, genus="L. ", bound.y=c(-0.2, 0.2),
bound.x1=c(-0.2,0.2), bound.x2 = c(-0.2,0.2))
pca2d_pwedd <- pca2d(pwed_pd[,56:110], sgn=-1, labcol=spcolmap$color,
phylo=TRUE, phy=ligotree, genus="L. ", bound.y=c(-0.2, 0.2),
bound.x1=c(-0.2,0.2), bound.x2 = c(-0.2,0.2))
#comparing size PC1 between ventral and dorsal anchors
hsplot(cbind(pca2d_pwedv$scores[,1], pca2d_pwedd$scores[,1]),
seqx=seq(-0.2,0.15,0.01), seqy=seq(-0.2,0.15,0.01),
xbound=c(-0.2,0.15), ybound=c(-0.2,0.15), y.label="Dorsal size PC1",
x.label="Ventral size PC1", labcol=spcolmap$color, type="ru",
sep1=0.1, sep2=0.1, phylo=FALSE, addline=c(0,1))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.