Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 1a80d9e

Browse filesBrowse files
committed
FIX: review comments
1 parent c24b2b9 commit 1a80d9e
Copy full SHA for 1a80d9e

File tree

1 file changed

+5
-2
lines changed
Filter options

1 file changed

+5
-2
lines changed

‎lib/matplotlib/figure.py

Copy file name to clipboardExpand all lines: lib/matplotlib/figure.py
+5-2Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1121,12 +1121,15 @@ def legend(self, *args, **kwargs):
11211121
# handle outside legends:
11221122
if isinstance(loc, str):
11231123
if loc.split()[0] == 'outside':
1124-
loc = loc.split(' ', 1)[1:]
1124+
# strip outside:
1125+
loc = loc.split('outside ')[1]
1126+
# strip "center" at the beginning
11251127
outside = loc.replace('center ', '')
1128+
# strip first
11261129
outside = outside.split()[0]
11271130
locs = loc.split()
11281131
if len(locs) > 1 and locs[0] in ('right', 'left'):
1129-
# loc doesn't accept "left upper", etc, so swap
1132+
# locs doesn't accept "left upper", etc, so swap
11301133
if locs[0] != 'center':
11311134
locs = locs[::-1]
11321135
loc = locs[0] + ' ' + locs[1]

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.