We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c24b2b9 commit 1a80d9eCopy full SHA for 1a80d9e
lib/matplotlib/figure.py
@@ -1121,12 +1121,15 @@ def legend(self, *args, **kwargs):
1121
# handle outside legends:
1122
if isinstance(loc, str):
1123
if loc.split()[0] == 'outside':
1124
- loc = loc.split(' ', 1)[1:]
+ # strip outside:
1125
+ loc = loc.split('outside ')[1]
1126
+ # strip "center" at the beginning
1127
outside = loc.replace('center ', '')
1128
+ # strip first
1129
outside = outside.split()[0]
1130
locs = loc.split()
1131
if len(locs) > 1 and locs[0] in ('right', 'left'):
- # loc doesn't accept "left upper", etc, so swap
1132
+ # locs doesn't accept "left upper", etc, so swap
1133
if locs[0] != 'center':
1134
locs = locs[::-1]
1135
loc = locs[0] + ' ' + locs[1]
0 commit comments