1plt.figure(figsize=(10,10))
2g = sns.heatmap(
3 by_sport,
4 square=True,
5 cbar_kws={'fraction' : 0.01},
6 cmap='OrRd',
7 linewidth=1
8)
9
10g.set_xticklabels(g.get_xticklabels(), rotation=45, horizontalalignment='right')
11g.set_yticklabels(g.get_yticklabels(), rotation=45, horizontalalignment='right')
1# This sets the yticks "upright" with 0, as opposed to sideways with 90.
2plt.yticks(rotation=0)
1plt.figure(figsize=(10,10))
2g = sns.heatmap(
3 by_sport,
4 square=True, # make cells square
5 cbar_kws={'fraction' : 0.01}, # shrink colour bar
6 cmap='OrRd', # use orange/red colour map
7 linewidth=1 # space between cells
8)