I am making two seaborn heatmaps, which I am putting into two matplotlib subplots, like so:
fig, axes = plt.subplots(2, 1, sharex=True, figsize=(5,10))
data = [
[0,0,0],
[0,0,0],
[0,0,0],
[0,0,0],
[0,0,0],
[0,0,0],
[0,0,0],
]
sns.heatmap(
data,
ax=axes[0],
linewidths=0.2,
cbar=False)
data = [
[0,0,0],
[0,0,0],
[0,0,0],
]
sns.heatmap(
data,
ax=axes[1],
linewidths=0.2,
cbar=False)
axes[0].set_title("A")
axes[1].set_title('B')
As you can see, this results in subplot A and B. The individual cells within subplot A are all the same size. The cells within subplot B are also all the same size. However, the cells between A and B are different sizes. How can I make sure that the size of cells between the subplots are the same?
I understand that means that plot A would overall be larger then plot B, which is not an issue.

