-1

I would like the symbols accross the top, not the bottom. Can't find docs on how to do this?

fig, x = plt.subplots(figsize=(width, height))
x = seaborn.heatmap(corr_df, annot=True, cmap='RdYlGn')
st.pyplot(fig)
Ivan
  • 7,448
  • 14
  • 69
  • 134

1 Answers1

1

IIUC, you are looking for xaxis.tick_top:

import seaborn as sns
import matplotlib.pyplot as plt

glue = sns.load_dataset("glue").pivot("Model", "Task", "Score")
ax = sns.heatmap(glue)
ax.invert_yaxis()
ax.xaxis.tick_top()
plt.show()

Output:

enter image description here

Corralien
  • 109,409
  • 8
  • 28
  • 52