From 858d43999b91ee3150fcb95ac6789f32f46e44e1 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 2 Jul 2024 00:22:49 +0000 Subject: [PATCH 1/3] [pre-commit.ci] pre-commit autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/astral-sh/ruff-pre-commit: v0.3.3 → v0.5.0](https://github.com/astral-sh/ruff-pre-commit/compare/v0.3.3...v0.5.0) --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 9b9859c..39d5212 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -3,7 +3,7 @@ ci: autoupdate_schedule: 'quarterly' repos: - repo: https://github.com/astral-sh/ruff-pre-commit - rev: 'v0.3.3' + rev: 'v0.5.0' hooks: - id: ruff args: [--fix] From 5065fe0e7649b27c2eea9a04fe1e3989a482e6d6 Mon Sep 17 00:00:00 2001 From: Greg Lucas Date: Tue, 2 Jul 2024 06:33:05 -0600 Subject: [PATCH 2/3] MNT: Update Matplotlib colormap usage in examples --- examples/plot_version_diff_surface.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/plot_version_diff_surface.py b/examples/plot_version_diff_surface.py index 232ba47..2a8564d 100644 --- a/examples/plot_version_diff_surface.py +++ b/examples/plot_version_diff_surface.py @@ -49,7 +49,7 @@ fig, axarr = plt.subplots(nrows=3, ncols=3, constrained_layout=True, figsize=(8, 6)) xx, yy = np.meshgrid(lons, lats) norm = mpl.colors.Normalize(-50, 50) -cmap = mpl.cm.get_cmap("RdBu_r") +cmap = mpl.colormaps["RdBu_r"] for i, ax in enumerate(axarr.flatten()): mesh = ax.pcolormesh(xx, yy, diff[:, :, i].T, shading="auto", norm=norm, cmap=cmap) ax.set_title(f"{variables[i]}") From 5e79dd8d14b0fd945ba57d9e3ce0298763036319 Mon Sep 17 00:00:00 2001 From: Greg Lucas Date: Tue, 2 Jul 2024 06:47:13 -0600 Subject: [PATCH 3/3] MNT: Update Matplotlib animation to use sequences --- examples/plot_surface_animation.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/plot_surface_animation.py b/examples/plot_surface_animation.py index 096b56b..d528049 100644 --- a/examples/plot_surface_animation.py +++ b/examples/plot_surface_animation.py @@ -73,9 +73,9 @@ def update_surface(t): date_string = dates[t].astype("O").strftime("%H:%M") title.set_text(f"{date_string}") - time_line.set_xdata(dates[t]) + time_line.set_xdata([dates[t]]) mesh.set_array(output[t, :, :, i].T) - sun.set_data(sun_loc[t], 0) + sun.set_data([sun_loc[t]], [0]) ani = FuncAnimation(fig, update_surface, frames=range(ndates), interval=25)