From c244ad8410efd31a35b1390a360a45fd1ed824d0 Mon Sep 17 00:00:00 2001 From: Oliver Jahn Date: Tue, 9 Apr 2024 17:31:08 -0400 Subject: [PATCH] Add ax argument needed in newer matplotlib --- utils/python/MITgcmutils/MITgcmutils/cs/pcol.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/python/MITgcmutils/MITgcmutils/cs/pcol.py b/utils/python/MITgcmutils/MITgcmutils/cs/pcol.py index 415b0ed668..dc79b4f159 100644 --- a/utils/python/MITgcmutils/MITgcmutils/cs/pcol.py +++ b/utils/python/MITgcmutils/MITgcmutils/cs/pcol.py @@ -180,7 +180,7 @@ def pcol( x, y, data, projection=None, vmin=None, vmax=None, **kwargs): # add a reasonable colormap m = cm.ScalarMappable(cmap=colmap) m.set_array(data) - plt.colorbar(m) + plt.colorbar(m, ax=ax) elif mapit == 0: ax = fig.axes[-1] ax.axis('image')