Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

plot_phylo

Plot a phylo tree object


Description

This is a wrapper around ape::plot.phylo() that makes several adjustments so plots agree more with accompanying kinship matrices. In particular, tree is reversed on the y-axis to match matrix orientation, y-axis spacing is more padded for small trees, and an x-axis scale is always added.

Usage

plot_phylo(tree, xlab = "Coancestry", xmax = NULL, leg_n = 5, ...)

Arguments

tree

A phylo object to plot.

xlab

The x-axis label (default "Coancestry").

xmax

X-axis maximum limit.

leg_n

The desired number of ticks in the x-axis (input to pretty(), see that for more details).

...

Additional parameters passed to ape::plot.phylo(). However, these parameters cannot be passed: x.lim (controlled via xmax), y.lim (a better default for small trees is passed and cannot be changed) and font (takes the value of par('font') instead of ape's default of 3 (italic)).

See Also

plot_popkin() can create multipanel figures including kinship matrices and trees (calling the present function in the process).

Examples

# create a small random tree
library(ape)
tree <- rtree( 3 )

# plot it!
plot_phylo( tree )

popkin

Estimate Kinship and FST under Arbitrary Population Structure

v1.3.13
GPL-3
Authors
Alejandro Ochoa [aut, cre] (<https://orcid.org/0000-0003-4928-3403>), John D. Storey [aut] (<https://orcid.org/0000-0001-5992-402X>)
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.