8000 FIX: add legend kwarg outside · matplotlib/matplotlib@b419198 · GitHub
[go: up one dir, main page]

Skip to content

Commit b419198

Browse files
committed
FIX: add legend kwarg outside
1 parent b767add commit b419198

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lib/matplotlib/figure.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1772,6 +1772,9 @@ def legend(self, *args, outside=False, axs=None, **kwargs):
17721772
cbook._warn_external('legend outside=True method needs '
17731773
'constrained_layout=True. Setting False')
17741774
outside = False
1775+
if outside and kwargs.get('bbox_to_anchor') is not None:
1776+
cbook._warn_external('legend outside=True ignores bbox_to_anchor '
1777+
'kwarg')
17751778

17761779
if not outside:
17771780
l = mlegend.Legend(self, handles, labels, *extra_args, **kwargs)

0 commit comments

Comments
 (0)
0