Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I keep cells square in heatmap?

Tags:

python

seaborn

When the cbar is on, the cells in seaborn's heatmap are rectangular. I could change the figsize of my axis, but I am wondering if there is an easier way to keep the cells square.

like image 515
Demetri Pananos Avatar asked Mar 21 '17 06:03

Demetri Pananos


1 Answers

seaborn heatmap has the option square:

heatmap(data, square=True)
like image 125
Olivetree Avatar answered Sep 20 '22 18:09

Olivetree