plot_tree: Plot the monoClust Tree.

Description Usage Arguments Value

View source: R/utils.R

Description

This function plots the MonoClust tree. It is partially inspired by rpart package.

Usage

1
2
3
4
5
6
7
8
9
plot_tree(
  x,
  uniform = FALSE,
  branch = 1,
  margin = 0,
  minbranch = 0.3,
  rel.loc.x = TRUE,
  ...
)

Arguments

x

MonoClust result object.

uniform

If TRUE, uniform vertical spacing of the nodes is used; this may be less cluttered when fitting a large plot onto a page. The default is to use a non-uniform spacing proportional to the inertia in the fit.

branch

Controls the shape of the branches from parent to child node. Any number from 0 to 1 is allowed. A value of 1 gives square shouldered branches, a value of 0 give V shaped branches, with other values being intermediate.

margin

An extra fraction of white space to leave around the borders of the tree. (Long labels sometimes get cut off by the default computation).

minbranch

Set the minimum length for a branch to minbranch times the average branch length. This parameter is ignored if uniform = TRUE. Sometimes a split will give very little improvement, or even no improvement at all. A tree with branch lengths strictly proportional to improvement leaves no room to squeeze in node labels.

rel.loc.x

Whether to use the relative distance between clusters as x coordinate of the leaves. Default is TRUE.

...

Arguments to be passed to graphics::plot.default() and graphics::lines().

Value

Plot of tree


vinhtantran/monoClust documentation built on March 12, 2021, 11:11 p.m.