Ploth: Changes the appearance of cluster dendrogram

View source: R/ploth.r

PlothR Documentation

Changes the appearance of cluster dendrogram

Description

Modifies several aspects of the cluster dendrogram

Usage


  Ploth(hclust, labels=hclust[["labels"]], lab.font=1, lab.col=1, col=1,
   pch.cex=1, pch=NA, bg=0, col.edges=FALSE, hang=-1, ...)

Arguments

hclust

Hclust object

labels

Labels

lab.font

Label font

lab.col

Label colors

col

Colors of edges and points

pch.cex

Scale of points

pch

Point types

bg

Points backgrounds

col.edges

Colorize edges?

hang

Makes leaves hang, see plot.hclust(); -1 is default here whereas 0.1 is default for 'hclust'

...

Further arguments to plot.dendrogram()

Details

Changes the appearance of cluster dendrogram. If labels are long, you might need to modify the plot margins.

Please take into account that supplied labels are meant to be in their _initial_ order, not in order of their appearance on the dendrogram.

Ploth() does not change the text size of labels, please use Tctext() and Tcoords() for this (and other) purposes.

Author(s)

Alexey Shipunov

See Also

Tcoords

Examples


iris.dist <- dist(iris[, 1:4], method="manhattan")
iris.hclust <- hclust(iris.dist)
Ploth(iris.hclust, col=as.numeric(iris[, 5]), pch=16, col.edges=TRUE, horiz=TRUE,
 leaflab="none")
legend("topleft", fill=1:nlevels(iris[, 5]), legend=levels(iris[, 5]))

Ploth(hclust(UScitiesD, "ward.D2"), labels=abbreviate(attr(UScitiesD, "Labels")),
 lab.col=c(1, rep(2, 9)), lab.font=c(2, rep(1, 9)), hang=0.1)


shipunov documentation built on Feb. 16, 2023, 9:05 p.m.

Related to Ploth in shipunov...