DingWB / PyComplexHeatmap

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

Allowing custom cmaps for annotations #44

Closed tanjimin closed 1 year ago

tanjimin commented 1 year 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 1 year 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.