Open birkanozer opened 1 year ago
I have the same issue as well. I think looking at seaborn's implemention of colors under their clustermap would help significantly.
Hi,
I had the same issue. I was able to solve the issue by adding: color_map= 'rdylbu'.
You can select any of the following colorscale you have provided above.
While I was trying to colourise my Clustergram, I tried to assign a list of colour names and a list of rgb() annotations to the "row_color" and "column_color" properties. Each time I received the following error:
` ValueError: Invalid value of type 'builtins.list' received for the 'colorscale' property of heatmap Received value: [[0, 'gray'], [0.0333333333, 'gray'], [0.0333333333, 'gray'], [0.0666666666, 'gray'], [0.0666666666, 'gray'], [0.0999999999, 'gray'], [0.0999999999, 'gray'], [0.1333333332, 'gray'], [0.1333333332, 'v'], [0.1666666665, 'v'], [0.1666666665, 'gray'], [0.1999999998, 'gray'], [0.1999999998, 'gray'], [0.2333333331, 'gray'], [0.2333333331, 'gray'], [0.2666666664, 'gray'], [0.2666666664, 'gray'], [0.2999999997, 'gray'], [0.2999999997, 'gray'], [0.333333333, 'gray'], [0.333333333, 'gray'], [0.3666666663, 'gray'], [0.3666666663, 'gray'], [0.3999999996, 'gray'], [0.3999999996, 'gray'], [0.4333333329, 'gray'], [0.4333333329, 'gray'], [0.4666666662, 'gray'], [0.4666666662, 'gray'], [0.4999999995, 'gray'], [0.4999999995, 'gray'], [0.5333333328, 'gray'], [0.5333333328, 'gray'], [0.5666666661, 'gray'], [0.5666666661, 'gray'], [0.5999999994, 'gray'], [0.5999999994, 'gray'], [0.6333333327, 'gray'], [0.6333333327, 'gray'], [0.666666666, 'gray'], [0.666666666, 'gray'], [0.6999999993, 'gray'], [0.6999999993, 'gray'], [0.7333333326, 'gray'], [0.7333333326, 'gray'], [0.7666666659, 'gray'], [0.7666666659, 'gray'], [0.7999999992, 'gray'], [0.7999999992, 'gray'], [0.8333333325, 'gray'], [0.8333333325, 'gray'], [0.8666666658, 'gray'], [0.8666666658, 's'], [0.8999999991, 's'], [0.8999999991, 'gray'], [0.9333333324, 'gray'], [0.9333333324, 'gray'], [0.9666666657, 'gray'], [0.9666666657, 'h'], [1, 'h']]
`
Based on that error I tried the second and the third options. I keep receiving the same error. I dig out the both "dash_bio" and "plotly" codebase and I found the reason.
The Clustergram class only accepts a list of HEX colour codes, which does not mention at any point in the documentation. After it receives this list, it calls "plotly.graph_objects.Heatmap" class and passes the colour list to the "colorscale" property. The "colorscale" is much more flexible in terms of receiving colour, hence giving it's own possible values on the error note. This makes the confusion.
Propose: The documentation about "row_color" and "column_color" according to current status or change this library to accept the same values as the underlying "Heatmap" class accepts.