I have a following DataFrame (called hehe):
11 22 33 44 55 66 77
s1 -3 5 7 8 -9 4 7
s2 4 3 8 1 4 4 -12
s3 1 -2 1 -4 8 8 -8
s4 -6 4 -4 9 -4 2 -6
And then the following code:
fig, (ax1, ax2) = plt.subplots(1,2, figsize=(6,4), gridspec_kw={'width_ratios':(1,15)})
sns.heatmap(hehe, ax=ax2, cbar=False, cmap="coolwarm", linewidth=1, vmin=-25, vmax=25)
ax2.set_aspect("equal")
ax2.set_title("A", fontsize=20, pad=30)
plt.colorbar(plt.cm.ScalarMappable(cmap="coolwarm", norm=mpl.colors.Normalize(vmin=-25, vmax=25)), cax=ax1)
ax1.yaxis.set_ticks_position('left')
I would like to add an additional x-axis to the top of the heatmap that will help me mark columns with a star (for statistical significancy). Let's say it would be: new_annotation = ["","","","","*","*",""]
I do not know how achieve this... I have been playing around with copying axes with twiny() but for some reason it did not work for me: the whole heatmap went out-of-bounds.

