Skip to content

Commit

Permalink
Set heatmap yticklabel alignment while rotating (#2574)
Browse files Browse the repository at this point in the history
* Set heatmap yticklabel alignment while rotating

Closes #2484

* Update release notes [skip ci]

(cherry picked from commit 430c1bf)
  • Loading branch information
mwaskom committed Aug 6, 2021
1 parent d107734 commit 5f69eeb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions doc/releases/v0.12.0.txt
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ v0.12.0 (Unreleased)

- |Fix| In :func:`displot`, fixed a bug where `common_norm` was ignored when `kind="hist"` and faceting was used without assigning `hue` (:pr:`2468`).

- |Fix| In :func:`heatmap`, fixed a bug where vertically-rotated y-axis tick labels would be misaligned with their rows (:pr:`2574`).

- |Defaults| In :func:`displot`, the default alpha value now adjusts to a provided `multiple` parameter even when `hue` is not assigned (:pr:`2462`).

- |Docs| Improved the API documentation for theme-related functions (:pr:`2573`).
Expand Down
1 change: 1 addition & 0 deletions seaborn/matrix.py
Original file line number Diff line number Diff line change
Expand Up @@ -325,6 +325,7 @@ def plot(self, ax, cax, kws):
ax.set(xticks=xticks, yticks=yticks)
xtl = ax.set_xticklabels(xticklabels)
ytl = ax.set_yticklabels(yticklabels, rotation="vertical")
plt.setp(ytl, va="center") # GH2484

# Possibly rotate them if they overlap
if hasattr(ax.figure.canvas, "get_renderer"):
Expand Down

0 comments on commit 5f69eeb

Please sign in to comment.