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

Method __init__

lib/matplotlib/transforms.py:2512–2533  ·  view source on GitHub ↗

Create a new composite transform that is the result of applying `Affine2DBase` *a* then `Affine2DBase` *b*. You will generally not call this constructor directly but write ``a + b`` instead, which will automatically choose the best kind of composite transfor

(self, a, b, **kwargs)

Source from the content-addressed store, hash-verified

2510 and *b* are 2D affines.
2511 """
2512 def __init__(self, a, b, **kwargs):
2513 """
2514 Create a new composite transform that is the result of
2515 applying `Affine2DBase` *a* then `Affine2DBase` *b*.
2516
2517 You will generally not call this constructor directly but write ``a +
2518 b`` instead, which will automatically choose the best kind of composite
2519 transform instance to create.
2520 """
2521 if not a.is_affine or not b.is_affine:
2522 raise ValueError("'a' and 'b' must be affine transforms")
2523 if a.output_dims != b.input_dims:
2524 raise ValueError("The output dimension of 'a' must be equal to "
2525 "the input dimensions of 'b'")
2526 self.input_dims = a.input_dims
2527 self.output_dims = b.output_dims
2528
2529 super().__init__(**kwargs)
2530 self._a = a
2531 self._b = b
2532 self.set_children(a, b)
2533 self._mtx = None
2534
2535 @property
2536 def depth(self):

Callers

nothing calls this directly

Calls 2

set_childrenMethod · 0.80
__init__Method · 0.45

Tested by

no test coverage detected