Fence {shipunov} | R Documentation |
Colorize tips of 'hclust' plot
Description
Uses segments() and Tcoords() to colorize 'hclust' plot
Usage
Fence(hcl, fct, ex=0.05, lwd=2.5, horiz=FALSE, hang=0.1, ...)
Arguments
hcl |
|
fct |
Variable to colorize labels, will be converted into factor |
ex |
The fraction of the plot height by which segments go up and down from the tips; by default, it is half of the 'hang' |
lwd |
Line width of segments |
horiz |
Plot on a horizontal tree? |
hang |
The fraction of the plot height by which labels should hang
below the rest of the plot; by default, it is equal to the default
'hang' from |
... |
Further arguments to segments() |
See Also
Examples
iris.h <- hclust(dist(iris[, -5]))
plot(iris.h, labels=FALSE)
Fence(iris.h, iris$Species)
legend("topright", legend=levels(iris$Species), col=1:3, lwd=2.5, bty="n")
[Package shipunov version 1.17.1 Index]