Right now I`m using Seaborn's clustermap to generate some clustered heatmaps - so far so good.
For a certain use case, I need to draw colored borders around specific cells. Is there a way to do that? Or with pcolormesh in matplotlib, or any other way?
You can do this by overplotting a Rectangle patch on the cell that you would want to highlight. Using the example plot from the seaborn docs
We can highlight a cell by doing
This will produce the plot with a highlighted cell like so:
Note the the indexing of the cells is 0 based with the origin at the bottom left.