sns heatmap yticklabel rotate code example
Example 1: seaborn heatmap x labels horizontal
# This sets the yticks "upright" with 0, as opposed to sideways with 90.
plt.yticks(rotation=0)
Example 2: seaborn heatmap xlabel rotation
plt.figure(figsize=(10,10))
g = sns.heatmap(
by_sport,
square=True, # make cells square
cbar_kws={'fraction' : 0.01}, # shrink colour bar
cmap='OrRd', # use orange/red colour map
linewidth=1 # space between cells
)