From 7ef65672ca62577b480ee560d7864a2b0c7fec2a Mon Sep 17 00:00:00 2001 From: giumas Date: Fri, 3 May 2024 18:23:15 +0200 Subject: [PATCH] bug fix for changes to Matplotlib API --- hdf_compass/compass_viewer/array/plot.py | 2 +- hdf_compass/compass_viewer/geo_array/plot.py | 2 +- hdf_compass/compass_viewer/geo_surface/plot.py | 2 +- hdf_compass/utils/__init__.py | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/hdf_compass/compass_viewer/array/plot.py b/hdf_compass/compass_viewer/array/plot.py index d7a49aa..85afec4 100644 --- a/hdf_compass/compass_viewer/array/plot.py +++ b/hdf_compass/compass_viewer/array/plot.py @@ -327,7 +327,7 @@ def draw_figure(self): img = self.axes.contourf(xx, yy, data, 25, cmap=plt.cm.get_cmap(self.colormap)) self.axes.set_aspect('equal') if self.cb: - self.cb.on_mappable_changed(img) + self.cb.update_normal(img) else: self.cb = plt.colorbar(img, ax=self.axes) self.cb.ax.tick_params(labelsize=8) diff --git a/hdf_compass/compass_viewer/geo_array/plot.py b/hdf_compass/compass_viewer/geo_array/plot.py index 45e5559..b8aea87 100644 --- a/hdf_compass/compass_viewer/geo_array/plot.py +++ b/hdf_compass/compass_viewer/geo_array/plot.py @@ -205,7 +205,7 @@ def draw_figure(self): self.axes.set_extent(self.geo_extent, crs=ccrs.PlateCarree()) if self.cb: - self.cb.on_mappable_changed(img) + self.cb.update_normal(img) else: self.cb = plt.colorbar(img, ax=self.axes) self.cb.ax.tick_params(labelsize=8) diff --git a/hdf_compass/compass_viewer/geo_surface/plot.py b/hdf_compass/compass_viewer/geo_surface/plot.py index 9aa1d51..b372d68 100644 --- a/hdf_compass/compass_viewer/geo_surface/plot.py +++ b/hdf_compass/compass_viewer/geo_surface/plot.py @@ -242,7 +242,7 @@ def draw_figure(self): self.axes.set_extent(self.geo_extent, crs=ccrs.PlateCarree()) if self.cb: - self.cb.on_mappable_changed(img) + self.cb.update_normal(img) else: self.cb = plt.colorbar(img, ax=self.axes) self.cb.ax.tick_params(labelsize=8) diff --git a/hdf_compass/utils/__init__.py b/hdf_compass/utils/__init__.py index f997fa0..ecf194b 100644 --- a/hdf_compass/utils/__init__.py +++ b/hdf_compass/utils/__init__.py @@ -17,4 +17,4 @@ from hdf_compass.utils.utils import is_darwin, is_win, is_linux, url2path, path2url, data_url -__version__ = "0.7.b13" +__version__ = "0.7.b14"