Learn R Programming

data.tree (version 0.2.0-3)

DefaultPlotHeight: Calculates the height of a Node given the hight of the root.

Description

This function puts leafs at the bottom (not hanging), and makes edges equally long. Useful for easy plotting with third-party packages, e.g. if you have no specific height attribute, e.g. with #' as.dendrogram.Node, ToNewick, and as.phylo.Node

Usage

DefaultPlotHeight(node, rootHeight = 100)

Arguments

node

The node

rootHeight

The height of the root

Examples

Run this code
# NOT RUN {
data(acme)
  dacme <- as.dendrogram(acme, heightAttribute = function(x) DefaultPlotHeight(x, 200))
  plot(dacme, center = TRUE)
# }

Run the code above in your browser using DataLab