From 386d868d347e9d729cebe081c565dfa54efeba6b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20Bel=C3=A1k?= Date: Thu, 7 Dec 2023 22:06:09 +0100 Subject: [PATCH] fix: remove deprecated matplotlib parameter (#197) Also adds a version constraint on `matplotlib` to use the minimum version where the parameter is not needed anymore. See https://stackoverflow.com/a/61403653 We do not consider this change as breaking since the minimum version which is now required is over 3 years old. --- edvart/report_sections/timeseries_analysis/fourier_transform.py | 2 +- pyproject.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/edvart/report_sections/timeseries_analysis/fourier_transform.py b/edvart/report_sections/timeseries_analysis/fourier_transform.py index 5fad81c..f28df76 100644 --- a/edvart/report_sections/timeseries_analysis/fourier_transform.py +++ b/edvart/report_sections/timeseries_analysis/fourier_transform.py @@ -159,7 +159,7 @@ def show_fourier_transform( y = 10 * np.log10(amplitude) if log else amplitude _fig, ax = plt.subplots(figsize=figsize) - ax.stem(fft_freq, y, use_line_collection=True, markerfmt="") + ax.stem(fft_freq, y, markerfmt="") ax.set_xlabel(f"Frequency [1 / {sampling_rate}{index_freq}]") ax.set_ylabel("Amplitude" + (" [dB]" if log else "")) ax.set_xlim(freq_min, freq_max) diff --git a/pyproject.toml b/pyproject.toml index 9faf91c..6b65673 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -13,7 +13,7 @@ python = ">=3.8, <3.12" ipykernel = "*" pandas = ">=1.5, <2.1" numpy = "*" -matplotlib = "*" +matplotlib = "^3.3" seaborn = "^0.12" plotly = ">=4.0.0, <6" statsmodels = ">0.10.2"