From 3793f16570d0fcb4521ba4797ebe6e3af44984c1 Mon Sep 17 00:00:00 2001 From: sroet Date: Fri, 16 Sep 2022 10:08:11 +0200 Subject: [PATCH] fix matplotlib 3.6 'Unable to determine Axes to steal space for Colorbar.' --- contact_map/plot_utils.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/contact_map/plot_utils.py b/contact_map/plot_utils.py index a373c72..3e3ee02 100644 --- a/contact_map/plot_utils.py +++ b/contact_map/plot_utils.py @@ -22,6 +22,7 @@ 'afmhot', 'gist_heat', 'copper' ] + def is_cmap_diverging(cmap): if cmap in _DIVERGING: return True @@ -31,6 +32,7 @@ def is_cmap_diverging(cmap): warnings.warn("Unknown colormap: Treating as sequential.") return False + def ranged_colorbar(cmap, norm, cbmin, cbmax, ax=None): """Create a colorbar with given endpoints. @@ -60,6 +62,7 @@ def ranged_colorbar(cmap, norm, cbmin, cbmax, ax=None): if ax is None: fig = plt + ax = plt.gca() else: fig = ax.figure