@@ -2615,14 +2615,25 @@ def __init__(self, path, transform):
2615
2615
self ._transformed_points = None
2616
2616
2617
2617
def _revalidate (self ):
2618
- # only recompute if the invalidation includes the non_affine part of the transform
2619
- if ((self ._invalid & self .INVALID_NON_AFFINE == self .INVALID_NON_AFFINE )
2620
- or self ._transformed_path is None ):
2621
- self ._transformed_path = \
2622
- self ._transform .transform_path_non_affine (self ._path )
2623
- self ._transformed_points = \
2624
- Path ._fast_from_codes_and_verts (self ._transform .transform_non_affine (self ._path .vertices ),
2625
- None , {'interpolation_steps' : self ._path ._interpolation_steps })
2618
+ # only recompute if the invalidation includes
2619
+ # the non_affine part of the transform
2620
+ if ((self ._invalid &
2621
+ self .INVALID_NON_AFFINE == self .INVALID_NON_AFFINE )
2622
+ or self ._transformed_path is None ):
2623
+
2624
+ tpath = self ._transform .transform_path_non_affine (self ._path )
2625
+ self ._transformed_path = tpath
2626
+
2627
+ x = self ._transform .transform_non_affine (self ._path .vertices )
2628
+ if ma .isMaskedArray (x ):
2629
+ x = x .astype (np .float_ ).filled (np .nan )
2630
+
2631
+ tpts = Path ._fast_from_codes_and_verts (verts = x , codes = None ,
2632
+ internals = {'interpolation_steps' :
2633
+ self ._path ._interpolation_steps })
2634
+
2635
+ self ._transformed_points = tpts
2636
+
2626
2637
self ._invalid = 0
2627
2638
2628
2639
def get_transformed_points_and_affine (self ):
0 commit comments