From 8aab7497edd3c00b2e07cc04b0960c3257e8be98 Mon Sep 17 00:00:00 2001 From: Michael Waskom Date: Wed, 5 May 2021 18:04:54 -0400 Subject: [PATCH] Set heatmap yticklabel alignment while rotating Closes #2484 --- seaborn/matrix.py | 1 + 1 file changed, 1 insertion(+) diff --git a/seaborn/matrix.py b/seaborn/matrix.py index a2ac8eef1c..c47774c581 100644 --- a/seaborn/matrix.py +++ b/seaborn/matrix.py @@ -334,6 +334,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 _draw_figure(ax.figure)