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

Skip to content

Commit dc87d3b

Browse files
committed
Cast to integer in contour
as suggested by comment
1 parent d7a5c8e commit dc87d3b

3 files changed

Lines changed: 2 additions & 2 deletions

File tree

lib/matplotlib/bezier.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -286,6 +286,7 @@ def split_path_inout(path, inside, tolerence=0.01, reorder_inout=False):
286286
verts_right = right[:]
287287

288288
#i += 1
289+
289290
if path.codes is None:
290291
path_in = Path(concat([path.vertices[:i], verts_left]))
291292
path_out = Path(concat([verts_right, path.vertices[i:]]))

lib/matplotlib/contour.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -475,7 +475,7 @@ def calc_label_rot_and_inline(self, slc, ind, lw, lc=None, spacing=5):
475475
pl, lc, [xi[1]])
476476

477477
# Make integer
478-
I = [np.floor(I[0]), np.ceil(I[1])]
478+
I = [int(np.floor(I[0])), int(np.ceil(I[1]))]
479479

480480
# Actually break contours
481481
if closed:

lib/matplotlib/hatch.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,6 @@ def get_path(hatchpattern, density=6):
212212
cursor = 0
213213
for pattern in patterns:
214214
if pattern.num_vertices != 0:
215-
num_vertices
216215
vertices_chunk = vertices[cursor:cursor + pattern.num_vertices]
217216
codes_chunk = codes[cursor:cursor + pattern.num_vertices]
218217
pattern.set_vertices_and_codes(vertices_chunk, codes_chunk)

0 commit comments

Comments
 (0)