Description Usage Arguments Details Author(s) References Examples
View source: R/tpColorPlot2d.R
This function enhances a typical two-dimensional scatter plot by enabling transparency control of color annotation. In addition, it provides option for phylogenetic tree superimposition.
1 2 3 |
x |
a two-column matrix with rownames (usually, the species names) |
labcol |
a character vector specifying species colors |
xlab |
title for the x-axis |
ylab |
title for the y-axis |
tit |
title for the plot |
circlesize |
a numeric vector that controls the centroid symbol size; defaults to 1 if |
tpfac |
a numeric vector specifying the transparency level (0 to 255) for individual data points and the label mean |
xbound |
range of values on the x-axis |
ybound |
range of values on the y-axis |
centroid |
if TRUE, plots the centroid for each species |
phylo |
if TRUE, coordinates of ancestral nodes from a supplied phylogeny ( |
phy |
an object of class |
pointscale |
a constant for controlling the size of the plotted ancestral nodes |
Transparency control of color-annotated data points reduces visual saturation caused by the use of solid colours,
thus allowing species centroids to be accentuated in the plot. In addition, if a user-supplied phylogeny is given,
it is superimposed onto the plot. This function depends on the phytools
(Revell, 2012) and ape
(Paradis et al., 2004)
packages.
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 | data(pwed_pd)
data(spcolmap)
pwed_pd_list <- matrix2list.2(pwed_pd)
lm1 <- c("V1_3","V1_5")
#scatter plot of LM1-LM3 length against LM1-LM5 length for the ventral anchors
tpColorPlot2d(pwed_pd[,colnames(pwed_pd) %in% lm1], labcol=spcolmap$color,
xlab=expression(paste("V1_3 ", "(", italic(mu),"m", ")")),
ylab=expression(paste("V1_5 ", "(", italic(mu),"m", ")")), centroid=TRUE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.