MCPcopy Index your code
hub / github.com/matplotlib/matplotlib / _transform_path

Method _transform_path

lib/matplotlib/lines.py:723–740  ·  view source on GitHub ↗

Put a TransformedPath instance at self._transformed_path; all invalidation of the transform is then handled by the TransformedPath instance.

(self, subslice=None)

Source from the content-addressed store, hash-verified

721 self._invalidy = False
722
723 def _transform_path(self, subslice=None):
724 """
725 Put a TransformedPath instance at self._transformed_path;
726 all invalidation of the transform is then handled by the
727 TransformedPath instance.
728 """
729 # Masked arrays are now handled by the Path class itself
730 if subslice is not None:
731 if self._drawstyle == 'default':
732 vertices = self._xy[subslice]
733 else:
734 step_func = STEP_LOOKUP_MAP[self._drawstyle]
735 vertices = np.asarray(step_func(*self._xy[subslice, :].T)).T
736 _path = Path(vertices,
737 _interpolation_steps=self._path._interpolation_steps)
738 else:
739 _path = self._path
740 self._transformed_path = TransformedPath(_path, self.get_transform())
741
742 def _get_transformed_path(self):
743 """Return this line's `~matplotlib.transforms.TransformedPath`."""

Callers 2

_get_transformed_pathMethod · 0.95
drawMethod · 0.95

Calls 3

PathClass · 0.85
TransformedPathClass · 0.85
get_transformMethod · 0.45

Tested by

no test coverage detected