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

phyloXXYY

Calculate node x and y coordinates


Description

Calculates the node x and y locations for plotting a phylogenetic tree.

Usage

phyloXXYY(phy, tip.order = NULL)

Arguments

phy

A phylo4 or phylo4d object.

tip.order

A character vector of tip labels, indicating their order along the y axis (from top to bottom). Or, a numeric vector of tip node IDs indicating the order.

Details

The y coordinates of the tips are evenly spaced from 0 to 1 in pruningwise order. Ancestor y nodes are given the mean value of immediate descendants. The root is given the x coordinate 0 and descendant nodes are placed according to the cumulative branch length from the root, with a maximum x value of 1.

Value

yy

Internal node and tip y coordinates

xx

Internal node and tip x coordinates

phy

A phylo4 or phylo4d object

segs

A list of h0x, h1x, v0x, v1x and h0y, h1y, v0y, v1y describing the start and end points for the plot line segments

torder

The tip order provided as tip.order or if NULL the preoder tip order

eorder

The an index of the reordered edges compared to the result of edges(phy)

Author(s)

Peter Cowan pdc@berkeley.edu

See Also

treePlot, plotOneTree

Examples

data(geospiza)
coor <- phyloXXYY(geospiza)
plot(coor$xx, coor$yy, pch = 20)

phylobase

Base Package for Phylogenetic Structures and Comparative Data

v0.8.10
GPL (>= 2)
Authors
R Hackathon et al. (alphabetically: Ben Bolker, Marguerite Butler, Peter Cowan, Damien de Vienne, Dirk Eddelbuettel, Mark Holder, Thibaut Jombart, Steve Kembel, Francois Michonneau, David Orme, Brian O'Meara, Emmanuel Paradis, Jim Regetz, Derrick Zwickl)
Initial release

We don't support your browser anymore

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