This is a similar question but not quite the same since I would like to do this with dendextend. My issue is that some of the names of my labels are quite long and I would like to just remove them. I had tried a few techniques already.
- I tried changing cex = 0
- I tried changing the color to white but all this does is hide the labels and when the names are long is still an issue.
- I tried plotting labels =F , but this does not work as well. Is there anyway to completely eliminate the labels? Here is an example code.
dend <- USArrests[1:5, ] %>%
dist() %>%
hclust() %>%
as.dendrogram()
dend = dend%>% set("labels_cex", 0) %>% set("labels_col", "white") # change to white however this does not work well because the color bars would just get pushed out
dend = dend%>% set("labels_cex", 0) %>% set("labels_col", "black") # setting cex to 0 does nothing
plot(dend, labels=FALSE ) # labels =F are ignore
colored_bars(colors = cbind (
state= "red" ))


