2

I run this code in order to have a circular dendrogram but the thing is that the labels are overlapping and all black.

Picture

This is the code I used to generate the figure:

library(dendextend)
library(circlize)

load(file = "hc1.rda")
#out1 <- cutree(hc1, k = 50)
load(file = "out1.rda")

dend <- as.dendrogram(hc1)
dorder <- order.dendrogram(dend)

colrs = colorRampPalette(c("blue", "red"))( 50)
library(colorBrewer)
# modify the dendrogram to have some colors in the branches and labels
dend1 <- color_branches(dend, col=colrs , 
                        clusters=out1)
plot(dend1)

# plot the radial plot
par(mar = rep(0,4))
# circlize_dendrogram(dend, dend_track_height = 0.8) 
circlize_dendrogram(dend1, labels_track_height = NA, 
                    dend_track_height = .4, labels = TRUE) 
divibisan
  • 11,659
  • 11
  • 40
  • 58
Marilou
  • 31
  • 8
  • Try using set("labels_cex", c(.5)) and see if that helps. (also you can change the size of the graphic device) – Tal Galili Dec 16 '18 at 18:28
  • 1
    The problem is you've got so many labels on a small plot that there's no way to fit them all in without them overlapping. I think you're going to have to either make your plot **gigantic** with tiny text, or remove most of the labels, leaving only a few important ones, or labels for broad categories – divibisan Dec 18 '18 at 15:36
  • My question at this point is, what would you like to show with this picture? Are all names required to bring up the message of this image? – Mr_Z Dec 18 '18 at 15:47

0 Answers0