- x
an object of class dendrogram, hclust, agnes, diana, hcut,
hkmeans or HCPC (FactoMineR).
- k
the number of groups for cutting the tree.
- h
a numeric value. Cut the dendrogram by cutting at height h. (k
overrides h)
- k_colors, palette
a vector containing colors to be used for the groups.
It should contain k colors. Allowed values also include "grey"
for grey color palettes; brewer palettes e.g. "RdBu", "Blues", ...; and
scientific journal palettes from ggsci R package, e.g.: "npg", "aaas",
"lancet", "jco", "ucscgb", "uchicago", "simpsons" and "rickandmorty".
- show_labels
a logical value. If TRUE, leaf labels are shown. Default
value is TRUE.
- color_labels_by_k
logical value. If TRUE, labels are colored
automatically by group when k != NULL.
- match_coord_colors
logical value. Default is FALSE, where dendrogram
colors follow the left-to-right leaf order. If TRUE, cluster colors are
remapped to cluster-label order so they match fviz_cluster()
and fviz_silhouette() for the same clustering.
- label_cols
a vector containing the colors for labels.
- labels_font
font face for the leaf labels of "rectangle"/"circular"
dendrograms. One of "plain" (default), "bold", "italic" or "bold.italic".
Default "plain" leaves labels unchanged.
- labels_track_height
a positive numeric value for adjusting the room for the
labels. Used only when type = "rectangle".
- repel
logical value. Use repel = TRUE to avoid label overplotting when
type = "phylogenic". The literal "phylogenic" value is a
historical API token retained for compatibility.
- lwd
a numeric value specifying dendrogram branch and rectangle line
width.
- highlight
an optional character vector of leaf labels; the branches
leading to those leaves are emphasized (thicker, and coloured
highlight.col) while every other branch keeps its colour and width.
NULL (default) highlights nothing. Has no effect for
type = "phylogenic" (that layout does not colour branch segments).
- highlight.col
colour (name or hex) for the highlighted branches.
- highlight.lwd
line width for the highlighted branches. NULL
(default) uses 2 * lwd so the emphasis stands out by thickness
regardless of colour; set highlight.lwd = lwd for colour-only emphasis.
- type
type of plot. Allowed values are "rectangle",
"circular", and the historical compatibility token
"phylogenic" for a phylogenetic-style tree.
- phylo_layout
the layout used for phylogenetic-style trees. Default value
is "layout.auto", which is kept as a compatibility alias for
"layout_nicely". Allowed values include:
layout.auto, layout_nicely,
layout_with_drl, layout_as_tree,
layout.gem, layout_with_gem,
layout.mds, layout_with_mds and
layout_with_lgl.
- rect
logical value specifying whether to add a rectangle around
groups. Used only when k != NULL.
- rect_border, rect_lty
border color and line type for rectangles.
- rect_fill
a logical value. If TRUE, fill the rectangle.
- lower_rect
a value of how low should the lower part of the rectangle
around clusters. Ignored when rect = FALSE.
- horiz
a logical value. If TRUE, a horizontal dendrogram is drawn.
- cex
size of labels
- main, xlab, ylab
main and axis titles
- sub
Plot subtitle. Default is NULL (no subtitle). Set to a character
string to display a subtitle below the title, e.g.
sub = paste0("Method: ", "ward.D2").
- ggtheme
function, ggplot2 theme name. Default value is
theme_classic(). Allowed values include ggplot2 official themes:
theme_gray(), theme_bw(), theme_minimal(), theme_classic(), theme_void(),
....
- ...
other arguments to be passed to the function plot.dendrogram()