ggplot2 for Cluster analysis (non-readible row names)
I have made a cluster analysis and ended up with dendrogram; however the row names are not readible (made a red rectangle). May I ask if there is way to adjust it?
library(reshape2)
library(purrr)
library(dplyr)
library(dendextend)
dendro - as.dendrogram(aggl.clust.c)
dendro.col - dendro %%
set(branches_k_color, k = 5, value = c(darkslategray, darkslategray4, darkslategray3, gold, gold2)) %%
set(branches_lwd, 0.6) %%
set(labels_colors,
value = c(darkslategray)) %%
set(labels_cex, 0.5)
ggd1 - as.ggdend(dendro.col)
ggplot(ggd1, theme = theme_minimal()) +
labs(x = Num. observations, y = Height, title = Dendrogram, k = 5)
Topic agglomerative ggplot2 r clustering
Category Data Science