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

Skip to content

Commit 6f77123

Browse files
committed
drop patches containing nan verts
svn path=/branches/v0_98_5_maint/; revision=6822
1 parent 6309af9 commit 6f77123

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

lib/matplotlib/patches.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,8 @@ def draw(self, renderer):
298298
tpath = transform.transform_path_non_affine(path)
299299
affine = transform.get_affine()
300300

301-
renderer.draw_path(gc, tpath, affine, rgbFace)
301+
if not np.isnan(tpath.vertices).any():
302+
renderer.draw_path(gc, tpath, affine, rgbFace)
302303

303304
#renderer.close_group('patch')
304305

0 commit comments

Comments
 (0)