We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 2e61658 + 87a3413 commit 94d73b7Copy full SHA for 94d73b7
lib/matplotlib/backend_bases.py
@@ -837,7 +837,12 @@ def get_clip_path(self):
837
an affine transform to apply to the path before clipping.
838
"""
839
if self._clippath is not None:
840
- return self._clippath.get_transformed_path_and_affine()
+ tpath, tr = self._clippath.get_transformed_path_and_affine()
841
+ if np.all(np.isfinite(tpath.vertices)):
842
+ return tpath, tr
843
+ else:
844
+ _log.warning("Ill-defined clip_path detected. Returning None.")
845
+ return None, None
846
return None, None
847
848
def get_dashes(self):
0 commit comments