I tried plotting a colorful dendrogram to include in my thesis, and it all works just fine apart from one thing: changing the font. I plotted many dendrograms before, and changing the font was never a problem, but in this code it suddenly is... I probably tried to write family="serif" in about any space possible, but idoes not work. My code:
dencw3m <- as.dendrogram(aggl.clust.manhattan.ward.cw3m)
dendro.col.cw3m <- dencw3m %>%
set("branches_k_color", k = 5, value = c("blue", "red", "limegreen", "gold", "darkorange")) %>%
set("branches_lwd", 0.6) %>%
set("labels_colors",
value = c("darkslategray")) %>%
set("labels_cex", 0.5)
gg.cw3m <- as.ggdend(dendro.col.cw3m)
ggplot(gg.cw3m, theme = theme_minimal()) +
labs(x = "Fall", y = "Homogenität", title = "Dendrogramm cw3m", family = "serif", cex = 0.4, hang = -1)