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 d533912

Browse filesBrowse files
committed
incorporate #16822
1 parent b59b310 commit d533912
Copy full SHA for d533912

File tree

Expand file treeCollapse file tree

1 file changed

+5
-6
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+5
-6
lines changed

‎lib/matplotlib/path.py

Copy file name to clipboardExpand all lines: lib/matplotlib/path.py
+5-6Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -337,12 +337,11 @@ def make_compound_path(cls, *args):
337337
codes = np.empty(len(vertices), dtype=cls.code_type)
338338
i = 0
339339
for path in args:
340-
codes = path.codes
341-
if codes is None:
342-
codes = np.full(len(path.vertices), Path.LINETO,
343-
dtype=Path.code_type)
344-
codes[0] = Path.MOVETO # so concatenated strokes stay separate
345-
codes[i:i + len(path.codes)] = codes
340+
if path.codes is None:
341+
codes[i] = cls.MOVETO
342+
codes[i + 1:i + len(codes)] = cls.LINETO
343+
else:
344+
codes[i:i + len(path.codes)] = path.codes
346345
i += len(path.vertices)
347346
# remove STOP's, since internal STOPs are a bug
348347
not_stop_mask = codes != cls.STOP

0 commit comments

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