How to label colored bars in a dendrogram
问题 How could I add a label for some colored bars I've added in a dendrogram plot? The code bellow will show the two attempts I've done for aiming task, which is linking the value 1 to the color red and value 0 to color white in a label for the colored bars. # replacing the graphic window parameter so the color bars would fit par( oma = c(0,1,1,1), mgp = c(1,0.5,0), mar = c(10,2,2,2) ) # load necessary packages library( squash ) library( dendextend ) # "initializatin" data("mtcars") myDend <- as