MCPcopy Create free account
hub / github.com/ColdGrub1384/Pyto / get_points

Method get_points

site-packages/matplotlib/transforms.py:1056–1083  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1054 _indent_str(self._transform)))
1055
1056 def get_points(self):
1057 if self._invalid:
1058 p = self._bbox.get_points()
1059 # Transform all four points, then make a new bounding box
1060 # from the result, taking care to make the orientation the
1061 # same.
1062 points = self._transform.transform(
1063 [[p[0, 0], p[0, 1]],
1064 [p[1, 0], p[0, 1]],
1065 [p[0, 0], p[1, 1]],
1066 [p[1, 0], p[1, 1]]])
1067 points = np.ma.filled(points, 0.0)
1068
1069 xs = min(points[:, 0]), max(points[:, 0])
1070 if p[0, 0] > p[1, 0]:
1071 xs = xs[::-1]
1072
1073 ys = min(points[:, 1]), max(points[:, 1])
1074 if p[0, 1] > p[1, 1]:
1075 ys = ys[::-1]
1076
1077 self._points = np.array([
1078 [xs[0], ys[0]],
1079 [xs[1], ys[1]]
1080 ])
1081
1082 self._invalid = 0
1083 return self._points
1084 get_points.__doc__ = Bbox.get_points.__doc__
1085
1086 if DEBUG:

Callers

nothing calls this directly

Calls 7

minFunction · 0.85
maxFunction · 0.85
get_pointsMethod · 0.45
transformMethod · 0.45
filledMethod · 0.45
arrayMethod · 0.45
_checkMethod · 0.45

Tested by

no test coverage detected