DingWB / PyComplexHeatmap

PyComplexHeatmap: A Python package to plot complex heatmap (clustermap)
https://dingwb.github.io/PyComplexHeatmap/
MIT License
249 stars 28 forks source link

Allowing custom cmaps for annotations #44

Closed tanjimin closed 11 months ago

tanjimin commented 11 months ago

Right now if we use custom cmap it gives an error. This gives the user the flexibility to use their custom cmaps. In the future probably you could check for cmap types.

DingWB commented 11 months ago

Actually, you were giving the custom cmap in a wrong way. Please see this example here.

You can define a custom cmap using my_cmap = LinearSegmentedColormap.from_list('my_cmap', [(0, 'lightgray'), (1, 'black')]), then pass to camp using cmap="my_cmap".

But your pull request is another solution. I merged your PR.