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

Skip to content

Commit 8b5d6af

Browse files
jbmohlertacaswell
authored andcommitted
use _fast_from_codes_and_verts in transform code
1 parent 9e68161 commit 8b5d6af

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

lib/matplotlib/transforms.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1411,8 +1411,9 @@ def transform_path_non_affine(self, path):
14111411
``transform_path(path)`` is equivalent to
14121412
``transform_path_affine(transform_path_non_affine(values))``.
14131413
"""
1414-
return Path(self.transform_non_affine(path.vertices), path.codes,
1415-
path._interpolation_steps)
1414+
x = self.transform_non_affine(path.vertices)
1415+
return Path._fast_from_codes_and_verts(x, path.codes,
1416+
{'interpolation_steps': path._interpolation_steps})
14161417

14171418
def transform_angles(self, angles, pts, radians=False, pushoff=1e-5):
14181419
"""
@@ -2618,8 +2619,8 @@ def _revalidate(self):
26182619
self._transformed_path = \
26192620
self._transform.transform_path_non_affine(self._path)
26202621
self._transformed_points = \
2621-
Path(self._transform.transform_non_affine(self._path.vertices),
2622-
None, self._path._interpolation_steps)
2622+
Path._fast_from_codes_and_verts(self._transform.transform_non_affine(self._path.vertices),
2623+
None, {'interpolation_steps': self._path._interpolation_steps})
26232624
self._invalid = 0
26242625

26252626
def get_transformed_points_and_affine(self):

0 commit comments

Comments
 (0)