seaborn heatmap x labels horizontal

Solutions on MaxInterview for seaborn heatmap x labels horizontal by the best coders in the world

showing results for - "seaborn heatmap x labels horizontal"
Angelo
31 Nov 2020
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')
Alma
19 Sep 2020
1# This sets the yticks "upright" with 0, as opposed to sideways with 90.
2plt.yticks(rotation=0) 
Ashley
28 Jan 2017
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)