seaborn heatmap x labels horizontal code example
Example 1: seaborn heatmap x labels horizontal
plt.yticks(rotation=0)
Example 2: seaborn heatmap xlabel rotation
plt.figure(figsize=(10,10))
g = sns.heatmap(
by_sport,
square=True,
cbar_kws={'fraction' : 0.01},
cmap='OrRd',
linewidth=1
)
g.set_xticklabels(g.get_xticklabels(), rotation=45, horizontalalignment='right')
g.set_yticklabels(g.get_yticklabels(), rotation=45, horizontalalignment='right')
Example 3: seaborn heatmap x labels horizontal
plt.yticks(rotation=0)
Example 4: seaborn heatmap xlabel rotation
plt.figure(figsize=(10,10))
g = sns.heatmap(
by_sport,
square=True,
cbar_kws={'fraction' : 0.01},
cmap='OrRd',
linewidth=1
)