Draw Cluster Tree over a Plane
Function draws a 3D plot where ordination result is at the bottom
plane and a hclust
dendrogram is drawn above the
plane.
orditree3d(ord, cluster, prune = 0, display = "sites", choices = c(1, 2), col = "blue", text, type = "p", ...) ordirgltree(ord, cluster, prune = 0, display = "sites", choices = c(1, 2), col = "blue", text, type = "p", ...)
ord |
An ordination object or an |
cluster |
Result of hierarchic cluster analysis, such as
|
prune |
Number of upper levels hierarchies removed from the
tree. If |
choices |
Choice of ordination axes. |
display |
Ordination scores displayed. |
col |
Colour of tree. The colour can be a vector and it is used for the points, text and terminal branches. The colour of internal branches is a mixture of connected leaves. |
text |
Text to replace the default of item labels when
|
type |
Display of leaves: |
... |
Arguments passed to |
orditree3d
uses scatterplot3d package to draw a static
3D plot of the dendrogram over the ordination, and
ordirgltree
uses rgl to make a dynamic, spinnable plot.
The functions were developed to plot a cluster dendrogram over a 2D
ordination plane, but any other plane can be used, for instance, a
map.
Function orditree3d
returns invisibly a
scatterplot3d
result object amended
with items points
and internal
that give the projected
coordinates of ordination scores and internal nodes, and
col.points
and col.internal
that give their
colours. All matrix-like objects can be accessed with
scores
.
Function ordirgltree
returns nothing.
Jari Oksanen.
orglcluster
and ordicluster
(in
vegan).
data(dune, dune.env) d <- vegdist(dune) m <- metaMDS(d) cl <- hclust(d, "aver") orditree3d(m, cl, pch=16, col=cutree(cl, 3)) ## ordirgltree makes ordinary rgl graphics. It accepts ## rgl.material() settings, and you can add elements to the ## open graph (for instance, bbox3d()). if (interactive() && require(rgl, quietly = TRUE)) { with(dune.env, ordirgltree(m, cl, col = as.numeric(Management), size = 6, lwd = 2, alpha = 0.6)) }
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.