ginkgogram: Plot Dendrogram with Leaves as Fans

ginkgogramR Documentation

Plot Dendrogram with Leaves as Fans

Description

Function is similar to standard hclust, but the leaves are drawn as fans with base proportional to weights (or sizes) of leaves.

Usage

ginkgogram(
  x,
  labels = NULL,
  check = TRUE,
  axes = TRUE,
  frame.plot = FALSE,
  ann = TRUE,
  main = "Cluster Ginkgogram",
  sub = NULL,
  xlab = NULL,
  ylab = "Height",
  w,
  col,
  leaf = Inf,
  ...
)

Arguments

x

An object of the type produced by hclust.

labels

A character vector of labels for te leaves of the tree.

check

Logical indicating if the x should be checked for validity.

axes, frame.plot, ann

Logical flags as in plot.default.

main, sub, xlab, ylab

Character strings to replace default annotation.

w

Weights of leaves.

col

Colour of the fill of leaves.

leaf

Maximum height of leaf triangle. Leaf height is smaller of this value and the height of the branch, and the default value (Inf) always draws leaves to the root. Special value TRUE will take the smallest branch height as the maximum height of each leaf.

...

Further graphical arguments

Details

Function ginkgogram has two new arguments to hclust: w for weights that give the base width of leaves, and col that gives the colour of the fill of leaves. The weights w must be numeric and non-negative, and zero weight guarantees that the leaf is drawn as a simple line similarly as in hclust.

Examples

## need vegan data sets
if (require(vegan)) {
data(dune, dune.phylodis, dune.taxon)
cl <- hclust(dune.phylodis)
ginkgogram(cl, w = colMeans(dune), col = factor(dune.taxon$Superorder))
## limit heights of the polygons to the Cretaceous
ginkgogram(cl, w = colMeans(dune), col = factor(dune.taxon$Superorder),
    leaf = 65)
}

jarioksa/natto documentation built on March 28, 2024, 12:45 a.m.