“Seorborn Heatmap x Etykiety poziome” Kod odpowiedzi

Rotacja mapy upałów morskich Xlabel

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')
White Faced Tree Rat

Seorborn Heatmap x Etykiety poziome

# This sets the yticks "upright" with 0, as opposed to sideways with 90.
plt.yticks(rotation=0) 
Yellowed Yacare

Rotacja mapy upałów morskich Xlabel

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
)
White Faced Tree Rat

Odpowiedzi podobne do “Seorborn Heatmap x Etykiety poziome”

Pytania podobne do “Seorborn Heatmap x Etykiety poziome”

Więcej pokrewnych odpowiedzi na “Seorborn Heatmap x Etykiety poziome” w Python

Przeglądaj popularne odpowiedzi na kod według języka

Przeglądaj inne języki kodu