From 5174f8ad36e1e346967a59f3307be43b6438ba53 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 14 Aug 2024 15:22:12 +0000 Subject: [PATCH] Bump matplotlib from 3.9.0 to 3.9.2 in /requirements (#2227) * Bump matplotlib from 3.9.0 to 3.9.2 in /requirements Bumps [matplotlib](https://github.com/matplotlib/matplotlib) from 3.9.0 to 3.9.2. - [Release notes](https://github.com/matplotlib/matplotlib/releases) - [Commits](https://github.com/matplotlib/matplotlib/compare/v3.9.0...v3.9.2) --- updated-dependencies: - dependency-name: matplotlib dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] * Fix everything except dates * Suppress remaining mypy errors --------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Adam J. Stewart --- .pre-commit-config.yaml | 2 +- experiments/ssl4eo/landsat/plot_landsat_bands.py | 6 +++--- experiments/ssl4eo/landsat/plot_landsat_timeline.py | 10 +++++----- requirements/required.txt | 2 +- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index b6cbc81a5..05dba0da7 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -24,7 +24,7 @@ repos: - einops>=0.6.0 - kornia>=0.6.9 - lightning>=2.0.9 - - matplotlib>=3.8.1 + - matplotlib>=3.9.2 - numpy>=1.22 - pillow>=10.4.0 - pytest>=6.1.2 diff --git a/experiments/ssl4eo/landsat/plot_landsat_bands.py b/experiments/ssl4eo/landsat/plot_landsat_bands.py index 2c72e7f88..9f15a29a6 100755 --- a/experiments/ssl4eo/landsat/plot_landsat_bands.py +++ b/experiments/ssl4eo/landsat/plot_landsat_bands.py @@ -46,7 +46,7 @@ df = pd.read_csv('band_data.csv', skip_blank_lines=True) df = df.iloc[::-1] fig, ax = plt.subplots(figsize=(5.5, args.fig_height)) -ax1, ax2 = fig.subplots(nrows=1, ncols=2, gridspec_kw={'width_ratios': [3, 1]}) # type: ignore[misc] +ax1, ax2 = fig.subplots(nrows=1, ncols=2, gridspec_kw={'width_ratios': [3, 1]}) sensor_names: list[str] = [] sensor_ylocs: list[float] = [] @@ -125,8 +125,8 @@ for (satellite, sensor), group1 in df.groupby(['Satellite', 'Sensor'], sort=Fals # Labels ax.set_xlabel(r'Wavelength (\textmu m)') -ax.set_xticks([0], labels=[0]) -ax.set_yticks([0], labels=[0]) +ax.set_xticks([0], labels=['0']) +ax.set_yticks([0], labels=['0']) ax.tick_params(colors='w') ax.spines[['bottom', 'left', 'top', 'right']].set_visible(False) diff --git a/experiments/ssl4eo/landsat/plot_landsat_timeline.py b/experiments/ssl4eo/landsat/plot_landsat_timeline.py index ef855f01e..83b868c40 100755 --- a/experiments/ssl4eo/landsat/plot_landsat_timeline.py +++ b/experiments/ssl4eo/landsat/plot_landsat_timeline.py @@ -88,10 +88,10 @@ for satellite in range(9, 0, -1): } xranges = [(start, end - start) for start, end in working[satellite]] - ax.broken_barh(xranges, hatch=None, **kwargs) + ax.broken_barh(xranges, hatch=None, **kwargs) # type: ignore[arg-type] xranges = [(start, end - start) for start, end in failing[satellite]] - ax.broken_barh(xranges, hatch='////', **kwargs) + ax.broken_barh(xranges, hatch='////', **kwargs) # type: ignore[arg-type] # Label xmin = global_xmax @@ -127,16 +127,16 @@ for satellite in range(9, 0, -1): 'verticalalignment': 'center_baseline', } - ax.text(x, horizontalalignment=horizontalalignment, **kwargs) + ax.text(x, horizontalalignment=horizontalalignment, **kwargs) # type: ignore[arg-type] yticks.append(ymin + args.bar_height / 2) ymin += args.bar_height + args.bar_sep ax.xaxis_date() -ax.set_xlim(global_xmin, global_xmax) +ax.set_xlim(global_xmin, global_xmax) # type: ignore[arg-type] ax.set_ylabel('Landsat Mission') ax.set_yticks(yticks) -ax.set_yticklabels(range(9, 0, -1)) +ax.set_yticklabels(map(str, range(9, 0, -1))) ax.tick_params(axis='both', which='both', top=False, right=False) ax.spines[['top', 'right']].set_visible(False) diff --git a/requirements/required.txt b/requirements/required.txt index 7eb45985b..3bfe39de5 100644 --- a/requirements/required.txt +++ b/requirements/required.txt @@ -7,7 +7,7 @@ fiona==1.9.6 kornia==0.7.3 lightly==1.5.11 lightning[pytorch-extra]==2.4.0 -matplotlib==3.9.0 +matplotlib==3.9.2 numpy==1.26.4 pandas==2.2.2 pillow==10.4.0