Clustergram not reordering heat-map rows
See original GitHub issueDescribe the bug Clustergram is not using the order provided by the clustering method and dendrogram to display the heat-map.
To Reproduce Steps to reproduce the behavior:
import numpy as np
import dash_bio
from plotly.offline import iplot, init_notebook_mode
init_notebook_mode()
data = np.array([[1,1,1,1],
[3,3,3,3],
[1,1,1,1],
[3,3,3,3],
[1,1,1,1],
[3,3,3,3]])
iplot(dash_bio.Clustergram(
data=np.array(data),
center_values=False
))
Expected behavior A clear and concise description of what you expected to happen. Heat-map rows reordering based on the clustering result.
Screenshots
If applicable, add screenshots to help explain the issue.

Python version: [e.g., 3.7.2] 3.7.4 Python environment (all installed packages in your current environment):
Additional context Add any other context about the problem here.
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (4 by maintainers)
Top Results From Across the Web
Clusters and Heatmaps - Jeffrey C. Oliver
The dendrogram should be vertically stretched so each tip lines up with a row in the heatmap plot. Re-order heatmap rows to match...
Read more >heatmap-suppress col reordering/dendrogram?
I want to make a heat map without row and column clustering to keep my row order as it is. It has ~8000genes....
Read more >reordering dendrograms on a clustergram in matlab
About the main problem: Suppose you put your data in nx2 a matrix A then you can sort it according to a column...
Read more >How can I rearrange columns for a HeatMap or Clustergram ...
My question is....see the x-axis? How can I re-arrange so that they are ordered, 1-6? I realize that this will inherently interfere with ......
Read more >clustergram - MathWorks
The clustergram function creates a clustergram object. The object contains hierarchical clustering analysis data that you can view in a heatmap and ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

I have finally found the bug, yay! Fixed in 611a1b358b66694a047e9ddafbf9ea7f9562eea1. PR coming soon…
Hi @mkcor , I would expect the result to be highly similar to Searborn Clustermap since they are the same type of figure. Using the data from my very basic example, the rows with identical values (ones or threes) should be next to each other. See the example below.
To be clear, the clusering in the Clustergram works as the dendrogram on the left side shows 2 groups. Although the rows in the heat-map are not reordered to represent these clusters. In the end, I would expect to get a block of red rows and a block of green rows.