title: plotting results of hierarchical clustering on top of a matrix of data
body: <p>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 the following figure:</p>
  <p><a href="https://i.stack.imgur.com/uGmw2.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/uGmw2.png" alt="enter image description here" /></a></p>
  <p>This is Figure 6 from: <a href="https://elifesciences.org/articles/07103" rel="nofollow noreferrer">A panel of induced pluripotent stem cells from chimpanzees: a resource for comparative functional genomics</a></p>
  <p>I use <code>scipy.cluster.dendrogram</code> 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 <code>scipy</code>, but not how to plot the intensity matrix of data with the right scale bar next to it.</p>