Closed tanjimin closed 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.
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.