python-pandas/pandas-pr59175-matplotlib.patch
Matej Cepl 1913e4ed18 - Update to 2.2.3
* Bug in eval() on complex including division /
    discards imaginary part. (GH 21374)
  * Minor fixes for numpy 2.1 compatibility. (GH 59444)
  * Missing licenses for 3rd party dependencies were
    added back into the wheels. (GH 58632)
- Drop pandas-pr58269-pyarrow16xpass.patch, merged upstream
- Drop pandas-pr58484-matplotlib.patch, merged upstream
- Drop pandas-pr59175-matplotlib.patch, merged upstream
- Drop pandas-pr59353-np2eval.patch, merged upstream
- Drop tests-npdev.patch, merged upstream
- Drop tests-timedelta.patch, merged upstream
- Refresh tests-nomkl.patch
- Renumber remaining patches

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:numeric/python-pandas?expand=0&rev=131
2024-10-02 08:15:57 +00:00

30 lines
1.1 KiB
Diff

From d4e803caf7aabd464f6fb1d43ef39903911a3cec Mon Sep 17 00:00:00 2001
From: Matthew Roeschke <10647082+mroeschke@users.noreply.github.com>
Date: Wed, 3 Jul 2024 06:45:24 -1000
Subject: [PATCH] Backport PR #59168: TST: Address UserWarning in matplotlib
test
---
pandas/plotting/_matplotlib/core.py | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/pandas/plotting/_matplotlib/core.py b/pandas/plotting/_matplotlib/core.py
index 2979903edf360..52382d9f7d572 100644
--- a/pandas/plotting/_matplotlib/core.py
+++ b/pandas/plotting/_matplotlib/core.py
@@ -893,7 +893,13 @@ def _make_legend(self) -> None:
elif self.subplots and self.legend:
for ax in self.axes:
if ax.get_visible():
- ax.legend(loc="best")
+ with warnings.catch_warnings():
+ warnings.filterwarnings(
+ "ignore",
+ "No artists with labels found to put in legend.",
+ UserWarning,
+ )
+ ax.legend(loc="best")
@final
@staticmethod