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 5971feb

Browse filesBrowse files
authored
Merge pull request #22704 from anntzer/tpg
Small simplification to textpath.
2 parents abdc7c4 + 0f757d2 commit 5971feb
Copy full SHA for 5971feb

File tree

Expand file treeCollapse file tree

1 file changed

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

1 file changed

+2
-6
lines changed

‎lib/matplotlib/textpath.py

Copy file name to clipboardExpand all lines: lib/matplotlib/textpath.py
+2-6Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -117,14 +117,10 @@ def get_text_path(self, prop, s, ismath=False):
117117
glyph_info, glyph_map, rects = self.get_glyphs_mathtext(prop, s)
118118

119119
verts, codes = [], []
120-
121120
for glyph_id, xposition, yposition, scale in glyph_info:
122121
verts1, codes1 = glyph_map[glyph_id]
123-
if len(verts1):
124-
verts1 = np.array(verts1) * scale + [xposition, yposition]
125-
verts.extend(verts1)
126-
codes.extend(codes1)
127-
122+
verts.extend(verts1 * scale + [xposition, yposition])
123+
codes.extend(codes1)
128124
for verts1, codes1 in rects:
129125
verts.extend(verts1)
130126
codes.extend(codes1)

0 commit comments

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