Fence | R Documentation |
Uses segments() and Tcoords() to colorize 'hclust' plot
Fence(hcl, fct, ex=0.05, lwd=2.5, horiz=FALSE, hang=0.1, ...)
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() |
Tcoords
, hclust
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")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.