plotting results of hierarchical clustering ontop of a matrix of data in python

Posted by user248237 on Stack Overflow See other posts from Stack Overflow or by user248237
Published on 2010-06-06T02:50:24Z Indexed on 2010/06/06 2:52 UTC
Read the original article Hit count: 387

How can I plot a dendrogram right on top of a matrix of values, reordered appropriately to reflect the clustering, in Python? An example is in the bottom of the following figure:

http://www.coriell.org/images/microarray.gif

I use scipy.cluster.dendrogram to make my dendrogram and perform hierarchical clustering on a matrix of data. How can I then plot the data as a matrix where the rows have been reordered to reflect a clustering induced by the cutting the dendrogram at a particular threshold, and have the dendrogram plotted alongside the matrix? I know how to plot the dendrogram in scipy, but not how to plot the intensity matrix of data with the right scale bar next to it.

Any help on this would be greatly appreciated.

© Stack Overflow or respective owner

Related posts about python

Related posts about numpy