From c0c29197ba4477b6c66775f8ff062c38eec9785d Mon Sep 17 00:00:00 2001 From: Lukas Mueller Date: Mon, 15 Mar 2021 23:39:29 +0100 Subject: [PATCH] Fixed colorbar positioning with tight layout --- calplot/calplot.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/calplot/calplot.py b/calplot/calplot.py index 38c0a14..007be07 100644 --- a/calplot/calplot.py +++ b/calplot/calplot.py @@ -345,6 +345,8 @@ def calplot(data, how='sum', fig.subplots_adjust(right=0.8) cax = fig.add_axes([0.85, 0.025, 0.02, 0.95]) fig.colorbar(axes[0].get_children()[1], cax=cax, orientation='vertical') + if tight_layout: + plt.tight_layout(rect=[0, 0, 0.8, 1]) stitle_kws.update(suptitle_kws) plt.suptitle(suptitle, **stitle_kws)