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

Method __init__

lib/matplotlib/transforms.py:2335–2359  ·  view source on GitHub ↗

Create a new "blended" transform using *x_transform* to transform the *x*-axis and *y_transform* to transform the *y*-axis. Both *x_transform* and *y_transform* must be 2D affine transforms. You will generally not call this constructor directly but use the

(self, x_transform, y_transform, **kwargs)

Source from the content-addressed store, hash-verified

2333 is_separable = True
2334
2335 def __init__(self, x_transform, y_transform, **kwargs):
2336 """
2337 Create a new "blended" transform using *x_transform* to transform the
2338 *x*-axis and *y_transform* to transform the *y*-axis.
2339
2340 Both *x_transform* and *y_transform* must be 2D affine transforms.
2341
2342 You will generally not call this constructor directly but use the
2343 `blended_transform_factory` function instead, which can determine
2344 automatically which kind of blended transform to create.
2345 """
2346 is_affine = x_transform.is_affine and y_transform.is_affine
2347 is_separable = x_transform.is_separable and y_transform.is_separable
2348 is_correct = is_affine and is_separable
2349 if not is_correct:
2350 raise ValueError("Both *x_transform* and *y_transform* must be 2D "
2351 "affine transforms")
2352
2353 Transform.__init__(self, **kwargs)
2354 self._x = x_transform
2355 self._y = y_transform
2356 self.set_children(x_transform, y_transform)
2357
2358 Affine2DBase.__init__(self)
2359 self._mtx = None
2360
2361 def get_matrix(self):
2362 # docstring inherited

Callers

nothing calls this directly

Calls 2

set_childrenMethod · 0.80
__init__Method · 0.45

Tested by

no test coverage detected