8000 Merge pull request #2875 from mdehoon/issue2872bugfix · matplotlib/matplotlib@3563cb5 · GitHub
[go: up one dir, main page]

Skip to content

Commit 3563cb5

Browse files
committed
Merge pull request #2875 from mdehoon/issue2872bugfix
Fix for issue #2872. Skip NaN's in draw_path_collection.
2 parents 25adc1c + 74273e8 commit 3563cb5

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/_macosx.m

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1619,6 +1619,8 @@ static int _transformation_converter(PyObject* object, void* pointer)
16191619
translation.x = - (origin.x - translation.x);
16201620
translation.y = - (origin.y - translation.y);
16211621
}
1622+
/* in case of missing values, translation may contain NaN's */
1623+
if (!isfinite(translation.x) || !isfinite(translation.y)) continue;
16221624
CGContextTranslateCTM(cr, translation.x, translation.y);
16231625
}
16241626

0 commit comments

Comments
 (0)
0