Skip to content

Commit 3c13004

Browse files
committed
wip
1 parent 26c7c13 commit 3c13004

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

pandas/plotting/_matplotlib/core.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -1187,7 +1187,8 @@ def _make_plot(self):
11871187
is_errorbar=is_errorbar,
11881188
**kwds,
11891189
)
1190-
self._add_legend_handle(newlines[0], label, index=i)
1190+
if label is not None:
1191+
self._add_legend_handle(newlines[0], label, index=i)
11911192

11921193
if self._is_ts_plot():
11931194

@@ -1518,7 +1519,8 @@ def _make_plot(self):
15181519
log=self.log,
15191520
**kwds,
15201521
)
1521-
self._add_legend_handle(rect, label, index=i)
1522+
if label is not None:
1523+
self._add_legend_handle(rect, label, index=i)
15221524

15231525
def _post_plot_logic(self, ax: Axes, data):
15241526
if self.use_index:

0 commit comments

Comments
 (0)