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

Skip to content

Commit 9ebdfd2

Browse files
committed
FIX: add legend kwarg outside
1 parent 3daa93b commit 9ebdfd2

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
@@ -1775,6 +1775,9 @@ def legend(self, *args, outside=False, axs=None, **kwargs):
17751775
cbook._warn_external('legend outside=True method needs '
17761776
'constrained_layout=True. Setting False')
17771777
outside = False
1778+
if outside and kwargs.get('bbox_to_anchor') is not None:
1779+
cbook._warn_external('legend outside=True ignores bbox_to_anchor '
1780+
'kwarg')
17781781

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

0 commit comments

Comments
 (0)
0