
This function plots the labels onto the MonoClust tree. It is partially inspired by rpart package.
text_tree(
x,
which = 4,
digits = getOption("digits") - 2,
stats = TRUE,
abbrev,
cols = NULL,
cols.type = c("l", "p", "b"),
rel.loc.x = TRUE,
show.pval = TRUE,
uniform = FALSE,
minbranch = 0.3,
...
)
MonoClust result object.
Labeling modes, which are:
1: only splitting variable names are shown, no splitting rules.
2: only splitting rules to the left branches are shown.
3: only splitting rules to the right branches are shown.
4 (default): splitting rules are shown on both sides of branches.
Number of significant digits to print.
Whether to show statistics (cluster sizes and medoid points) on the tree.
Whether to print the abbreviated versions of variable names. Can be either "no" (default), "short", or "abbreviate". Short forms of them can also be used.
If "no", the labels recorded in x$labels
are used.
If "short", variable names will be turned into "V1", "V2", ...
If "abbreviate", abbreviate()
function will be used. Use the optional
arguments for this function.
Whether to shown color bars at leaves or not. It helps matching
this tree plot with other plots whose cluster membership were colored. It
only works when text
is TRUE
. Either NULL
, a vector of one color, or
a vector of colors matching the number of leaves.
Whether to use the relative distance between clusters as x coordinate of the leaves. Default is TRUE.
If MonoClust object has been run through perm.test()
,
whether to show p-value on the tree.
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.
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.
Extra arguments that would be transferred to graphics::text()
Labels on tree.