Back to Seaborn

Heatmap

doc/_docstrings/heatmap.ipynb

0.13.2668 B
Original Source
python
import seaborn as sns
sns.set_theme()
python
glue = sns.load_dataset("glue").pivot(index="Model", columns="Task", values="Score")
sns.heatmap(glue)
python
sns.heatmap(glue, annot=True)
python
sns.heatmap(glue, annot=True, fmt=".1f")
python
sns.heatmap(glue, annot=glue.rank(axis="columns"))
python
sns.heatmap(glue, annot=True, linewidth=.5)
python
sns.heatmap(glue, cmap="crest")
python
sns.heatmap(glue, cmap=sns.cubehelix_palette(as_cmap=True))
python
sns.heatmap(glue, vmin=50, vmax=100)
python
ax = sns.heatmap(glue, annot=True)
ax.set(xlabel="", ylabel="")
ax.xaxis.tick_top()