plot_glotto: Plot a tree in downward, linguistic style

View source: R/plotting.R

plot_glottoR Documentation

Plot a tree in downward, linguistic style

Description

An attempt is made to choose a reasonable plot width, height and offset of the labels from the tree's tips. If the choices are not satisfactory, manipulate them using positive or negative values of extra_width, extra_height and extra_offset.

Usage

plot_glotto(
  phy,
  nodelabels = TRUE,
  extra_width = 0,
  extra_height = 0,
  extra_offset = 0,
  srt = 0,
  adj = NULL,
  ...
)

Arguments

phy

A phylo object.

nodelabels

A logical, whether to plot node labels.

extra_width

A numeric, extra width to add beyond the default.

extra_height

A numeric, extra height to add beyond the default.

extra_offset

A numeric, extra offset to add beyond the default.

srt

A numeric giving how much the labels are rotated in degrees.

adj

A numeric specifying the justification of the text strings of the labels: 0 (left-justification), 0.5 (centering), or 1 (right-justification).

...

Additional arguments passed to plot().

Details

By default, tip labels will run vertically, except in the case that all tip labels are a maximum of one character long, in which case they are oriented horizontally.

Examples


library(ape)

tree <- abridge_labels(get_glottolog_trees("Tangkic"))
plot_glotto(tree)
tree2 <- rescale_deepest_branches(tree, 7)
plot_glotto(tree2)
plot_glotto(tree2, srt = 90, adj = 0.5)

erichround/glottoTrees documentation built on April 17, 2025, 10:47 a.m.