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
import seaborn as sns
import matplotlib.pyplot as plt
sns.set()
flights = sns.load_dataset("flights")
flights = flights.pivot("month", "year", "passengers")
g = sns.clustermap(flights)
We can highlight a cell by doing
from matplotlib.patches import Rectangle
ax = g.ax_heatmap
ax.add_patch(Rectangle((3, 4), 1, 1, fill=False, edgecolor='blue', lw=3))
plt.show()
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.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…