Skip to content

Commit

Permalink
use _fast_from_codes_and_verts in transform code
Browse files Browse the repository at this point in the history
  • Loading branch information
jbmohler committed Oct 20, 2014
1 parent 38d69b0 commit 91725d8
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions lib/matplotlib/transforms.py
Expand Up @@ -1380,8 +1380,9 @@ def transform_path_non_affine(self, path):
``transform_path(path)`` is equivalent to
``transform_path_affine(transform_path_non_affine(values))``.
"""
return Path(self.transform_non_affine(path.vertices), path.codes,
path._interpolation_steps)
x = self.transform_non_affine(path.vertices)
return Path._fast_from_codes_and_verts(x, path.codes,
{'interpolation_steps': path._interpolation_steps})

def transform_angles(self, angles, pts, radians=False, pushoff=1e-5):
"""
Expand Down Expand Up @@ -2587,8 +2588,8 @@ def _revalidate(self):
self._transformed_path = \
self._transform.transform_path_non_affine(self._path)
self._transformed_points = \
Path(self._transform.transform_non_affine(self._path.vertices),
None, self._path._interpolation_steps)
Path._fast_from_codes_and_verts(self._transform.transform_non_affine(self._path.vertices),
None, {'interpolation_steps': self._path._interpolation_steps})
self._invalid = 0

def get_transformed_points_and_affine(self):
Expand Down

0 comments on commit 91725d8

Please sign in to comment.