Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 1fe8981

Browse files
Code review updates
1 parent dded75c commit 1fe8981

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

lib/matplotlib/collections.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1518,7 +1518,7 @@ def _make_verts(self, t, f1, f2, where):
15181518
if n > 0:
15191519
pts = np.empty((2 * n, 2)) # Preallocate and fill for speed
15201520
pts[:n, 0], pts[:n, 1] = t_where, f1_where
1521-
pts[n:, 0], pts[n:, 1] = t_where[::-1], f2_where[::-1]
1521+
pts[n:, 0], pts[n:, 1] = t_where, f2_where
15221522
self._bbox.update_from_data_xy(self._fix_pts_xy_order(pts))
15231523

15241524
return [
@@ -1581,8 +1581,9 @@ def _make_verts_for_region(self, t, f1, f2, idx0, idx1):
15811581
# Preallocate and fill for speed
15821582
n = len(t_slice)
15831583
pts = np.empty((2 * n + 2, 2))
1584-
pts[0], pts[n+1] = start, end
1584+
pts[0, :] = start
15851585
pts[1:n+1, 0], pts[1:n+1, 1] = t_slice, f1_slice
1586+
pts[n+1, :] = end
15861587
pts[n+2:, 0], pts[n+2:, 1] = t_slice[::-1], f2_slice[::-1]
15871588

15881589
return self._fix_pts_xy_order(pts)

0 commit comments

Comments
 (0)