Learn R Programming

monogeneaGM (version 1.1)

plotCircular: Circular plot

Description

This function creates a circular plot (Batschelet, 1981) showing how mean directional change of GPA coordinates in species of interest is distributed relative the root ancestor. Magnitude of directional change is proportional to the length of ray projecting from a data point.

Usage

plotCircular(x, ancestor, col.lab, clade, LM, f = c(100, 0.1), sf = 1.5, ptscale = 1, tit = NULL)

Arguments

x
a list containing objects that are matrices of average GPA coordinates for a set of species. The names of this x contains should contain the species names
ancestor
a matrix specifying the GPA coordinates of the root ancestor estimated using the fastAnc function in the phytools package
col.lab
a character vector specifying colors for species with matching indices in x
clade
a character vector specifying the species that form a clade of interest; currently supports only two clades
LM
the landmark of interest
f
scaling factors for the magnitude of directional change
sf
shrinking factor for shrink argument in plot.circular from the circular package
ptscale
scaling factor for size of data point on the circle perimeter
tit
title for the circular plot

Details

The arms in the circle are color-annotated according to clade of interest, with their direction and length indicating mean directional and magnitude change in the clades of interest, respectively. The circular plot is a useful complement to the wireframe-lollipop plot produced using shapeEvo, as it shows directional distribution details for all species at the individual landmark level. When used in conjunction with the principal component loadings heat map produced using pcloadhm, it can greatly aid biological interpretation of the principal components. This function depends on the phytools (Revell, 2012) and circular (Agostinelli & Lund, 2013) packages.

References

Agostinelli C, Lund U. (2013). R package 'circular': Circular Statistics (version 0.4-7). Available at: https://r-forge.r-project.org/projects/circular.

Batschelet E. (1981). Circular Statistics in Biology. London: Academic Press.

Khang TF, Soo OYM, Tan WB, Lim LHS. (2016). Monogenean anchor morphometry: systematic value, phylogenetic signal, and evolution. PeerJ 4:e1668.

Revell LJ. (2012). phytools: An R package for phylogenetic comparative biology (and other things). Methods in Ecology and Evolution 3:217-223.

See Also

anglecheck, shapeEvo, pcloadhm

Examples

Run this code
library(circular)

data(va_mean)
data(estimated_ancestral_va)
data(spcolmap)

#the species in the defined clade infects the fish host Liza subviridis (dodger blue color)
plotCircular(va_mean, estimated_ancestral_va, col.lab=spcolmap$color,
clade=spcolmap[spcolmap$host %in% "L.subviridis",]$species, LM=6, tit=6)

Run the code above in your browser using DataLab