Can I reduce the height of an element in my dendrogram using hclust, in R?

53 Views Asked by At

This my code that produces a dendrogram;

# Create PNG file
png("Cell_Hierarchical_Clustering_Dendrogram.png", width = 800, height = 1200)

# Perform hierarchical clustering on the transposed data
hc <- hclust(dist(OfInterestHeatmapTransposed))

# Plot the hierarchical clustering dendrogram without displaying branch heights
plot(hc, main = "Cell Hierarchical Clustering Dendrogram", cex = 0.6, heights = NULL, horiz = TRUE)

# Close the plotting device
dev.off(). 

This is the resulting dendrogram:

enter image description here

Note height of the groups in green are making it difficult to distinguish the lower branches clearly. I do not want to loose this group as it critical to my study but i want to see the detail of my dendrogram at the lower branches. How can i do this and is there a way to remove the height axis?

I want a dendrogram where all the branches are clear to see and not skewed by the height of the green group. I ideally I would also like the height axis removed.

0

There are 0 best solutions below