This is a test version of Biostars. For the public version, visit https://www.biostars.org.
tree and heatmap

I want to plot a tree and heatmap. the input is a distance matrix. I plot a tree using NJ. I used ggtree to plot it. The order of tree and the order of heatmap is not consistent. Is there any option to set the matrix to be symmetry ? Thank you.

ggtree

1 answer

The heatmap() function can take custom dendrograms for rows and columns, check the Rowv and Colv parameters.

Log in to answer this question.