Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to create a seaborn.heatmap() with frames around the tiles?

I rendered a heatmap with seaborn.heatmap() works nicely. However, for a certain purpose I need frames around the plot.

matplotlib.rcParams['axes.edgecolor'] = 'black'
matplotlib.rcParams['axes.linewidth'] = 1

both don't work.

like image 650
Soren Avatar asked Apr 11 '16 23:04

Soren


Video Answer


1 Answers

ax = sns.heatmap(x)
for _, spine in ax.spines.items():
    spine.set_visible(True)
like image 70
mwaskom Avatar answered Sep 19 '22 23:09

mwaskom