Skip to content

Commit a5ea822

Browse files
committed
Merge remote-tracking branch 'upstream/main' into enforce-match
2 parents fde9825 + dcb5494 commit a5ea822

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

pandas/plotting/_matplotlib/core.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -893,7 +893,13 @@ def _make_legend(self) -> None:
893893
elif self.subplots and self.legend:
894894
for ax in self.axes:
895895
if ax.get_visible():
896-
ax.legend(loc="best")
896+
with warnings.catch_warnings():
897+
warnings.filterwarnings(
898+
"ignore",
899+
"No artists with labels found to put in legend.",
900+
UserWarning,
901+
)
902+
ax.legend(loc="best")
897903

898904
@final
899905
@staticmethod

0 commit comments

Comments
 (0)