doc_content
stringlengths
1
386k
doc_id
stringlengths
5
188
transformed(transform)[source] Construct a Bbox by statically transforming this one by transform.
matplotlib.transformations#matplotlib.transforms.BboxBase.transformed
translated(tx, ty)[source] Construct a Bbox by translating this one by tx and ty.
matplotlib.transformations#matplotlib.transforms.BboxBase.translated
staticunion(bboxes)[source] Return a Bbox that contains all of the given bboxes.
matplotlib.transformations#matplotlib.transforms.BboxBase.union
classmatplotlib.transforms.BboxTransform(boxin, boxout, **kwargs)[source] Bases: matplotlib.transforms.Affine2DBase BboxTransform linearly transforms points from one Bbox to another. Create a new BboxTransform that linearly transforms points from boxin to boxout. __init__(boxin, boxout, **kwargs)[source] Create a new BboxTransform that linearly transforms points from boxin to boxout. __module__='matplotlib.transforms' __str__()[source] Return str(self). get_matrix()[source] Get the matrix for the affine part of this transform. is_separable=True True if this transform is separable in the x- and y- dimensions.
matplotlib.transformations#matplotlib.transforms.BboxTransform
__init__(boxin, boxout, **kwargs)[source] Create a new BboxTransform that linearly transforms points from boxin to boxout.
matplotlib.transformations#matplotlib.transforms.BboxTransform.__init__
__module__='matplotlib.transforms'
matplotlib.transformations#matplotlib.transforms.BboxTransform.__module__
__str__()[source] Return str(self).
matplotlib.transformations#matplotlib.transforms.BboxTransform.__str__
get_matrix()[source] Get the matrix for the affine part of this transform.
matplotlib.transformations#matplotlib.transforms.BboxTransform.get_matrix
is_separable=True True if this transform is separable in the x- and y- dimensions.
matplotlib.transformations#matplotlib.transforms.BboxTransform.is_separable
classmatplotlib.transforms.BboxTransformFrom(boxin, **kwargs)[source] Bases: matplotlib.transforms.Affine2DBase BboxTransformFrom linearly transforms points from a given Bbox to the unit bounding box. Parameters shorthand_namestr A string representing the "name" of the transform. The name carries no significance other than to improve the readability of str(transform) when DEBUG=True. __init__(boxin, **kwargs)[source] Parameters shorthand_namestr A string representing the "name" of the transform. The name carries no significance other than to improve the readability of str(transform) when DEBUG=True. __module__='matplotlib.transforms' __str__()[source] Return str(self). get_matrix()[source] Get the matrix for the affine part of this transform. is_separable=True True if this transform is separable in the x- and y- dimensions.
matplotlib.transformations#matplotlib.transforms.BboxTransformFrom
__init__(boxin, **kwargs)[source] Parameters shorthand_namestr A string representing the "name" of the transform. The name carries no significance other than to improve the readability of str(transform) when DEBUG=True.
matplotlib.transformations#matplotlib.transforms.BboxTransformFrom.__init__
__module__='matplotlib.transforms'
matplotlib.transformations#matplotlib.transforms.BboxTransformFrom.__module__
__str__()[source] Return str(self).
matplotlib.transformations#matplotlib.transforms.BboxTransformFrom.__str__
get_matrix()[source] Get the matrix for the affine part of this transform.
matplotlib.transformations#matplotlib.transforms.BboxTransformFrom.get_matrix
is_separable=True True if this transform is separable in the x- and y- dimensions.
matplotlib.transformations#matplotlib.transforms.BboxTransformFrom.is_separable
classmatplotlib.transforms.BboxTransformTo(boxout, **kwargs)[source] Bases: matplotlib.transforms.Affine2DBase BboxTransformTo is a transformation that linearly transforms points from the unit bounding box to a given Bbox. Create a new BboxTransformTo that linearly transforms points from the unit bounding box to boxout. __init__(boxout, **kwargs)[source] Create a new BboxTransformTo that linearly transforms points from the unit bounding box to boxout. __module__='matplotlib.transforms' __str__()[source] Return str(self). get_matrix()[source] Get the matrix for the affine part of this transform. is_separable=True True if this transform is separable in the x- and y- dimensions.
matplotlib.transformations#matplotlib.transforms.BboxTransformTo
__init__(boxout, **kwargs)[source] Create a new BboxTransformTo that linearly transforms points from the unit bounding box to boxout.
matplotlib.transformations#matplotlib.transforms.BboxTransformTo.__init__
__module__='matplotlib.transforms'
matplotlib.transformations#matplotlib.transforms.BboxTransformTo.__module__
__str__()[source] Return str(self).
matplotlib.transformations#matplotlib.transforms.BboxTransformTo.__str__
get_matrix()[source] Get the matrix for the affine part of this transform.
matplotlib.transformations#matplotlib.transforms.BboxTransformTo.get_matrix
is_separable=True True if this transform is separable in the x- and y- dimensions.
matplotlib.transformations#matplotlib.transforms.BboxTransformTo.is_separable
classmatplotlib.transforms.BboxTransformToMaxOnly(boxout, **kwargs)[source] Bases: matplotlib.transforms.BboxTransformTo BboxTransformTo is a transformation that linearly transforms points from the unit bounding box to a given Bbox with a fixed upper left of (0, 0). Create a new BboxTransformTo that linearly transforms points from the unit bounding box to boxout. __module__='matplotlib.transforms' get_matrix()[source] Get the matrix for the affine part of this transform.
matplotlib.transformations#matplotlib.transforms.BboxTransformToMaxOnly
__module__='matplotlib.transforms'
matplotlib.transformations#matplotlib.transforms.BboxTransformToMaxOnly.__module__
get_matrix()[source] Get the matrix for the affine part of this transform.
matplotlib.transformations#matplotlib.transforms.BboxTransformToMaxOnly.get_matrix
matplotlib.transforms.blended_transform_factory(x_transform, y_transform)[source] Create a new "blended" transform using x_transform to transform the x-axis and y_transform to transform the y-axis. A faster version of the blended transform is returned for the case where both child transforms are affine.
matplotlib.transformations#matplotlib.transforms.blended_transform_factory
classmatplotlib.transforms.BlendedAffine2D(x_transform, y_transform, **kwargs)[source] Bases: matplotlib.transforms._BlendedMixin, matplotlib.transforms.Affine2DBase A "blended" transform uses one transform for the x-direction, and another transform for the y-direction. This version is an optimization for the case where both child transforms are of type Affine2DBase. 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 blended_transform_factory function instead, which can determine automatically which kind of blended transform to create. __init__(x_transform, y_transform, **kwargs)[source] 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 blended_transform_factory function instead, which can determine automatically which kind of blended transform to create. __module__='matplotlib.transforms' get_matrix()[source] Get the matrix for the affine part of this transform. is_separable=True True if this transform is separable in the x- and y- dimensions.
matplotlib.transformations#matplotlib.transforms.BlendedAffine2D
__init__(x_transform, y_transform, **kwargs)[source] 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 blended_transform_factory function instead, which can determine automatically which kind of blended transform to create.
matplotlib.transformations#matplotlib.transforms.BlendedAffine2D.__init__
__module__='matplotlib.transforms'
matplotlib.transformations#matplotlib.transforms.BlendedAffine2D.__module__
get_matrix()[source] Get the matrix for the affine part of this transform.
matplotlib.transformations#matplotlib.transforms.BlendedAffine2D.get_matrix
is_separable=True True if this transform is separable in the x- and y- dimensions.
matplotlib.transformations#matplotlib.transforms.BlendedAffine2D.is_separable
classmatplotlib.transforms.BlendedGenericTransform(x_transform, y_transform, **kwargs)[source] Bases: matplotlib.transforms._BlendedMixin, matplotlib.transforms.Transform A "blended" transform uses one transform for the x-direction, and another transform for the y-direction. This "generic" version can handle any given child transform in the x- and y-directions. Create a new "blended" transform using x_transform to transform the x-axis and y_transform to transform the y-axis. You will generally not call this constructor directly but use the blended_transform_factory function instead, which can determine automatically which kind of blended transform to create. __init__(x_transform, y_transform, **kwargs)[source] Create a new "blended" transform using x_transform to transform the x-axis and y_transform to transform the y-axis. You will generally not call this constructor directly but use the blended_transform_factory function instead, which can determine automatically which kind of blended transform to create. __module__='matplotlib.transforms' contains_branch(other)[source] Return whether the given transform is a sub-tree of this transform. This routine uses transform equality to identify sub-trees, therefore in many situations it is object id which will be used. For the case where the given transform represents the whole of this transform, returns True. propertydepth Return the number of transforms which have been chained together to form this Transform instance. Note For the special case of a Composite transform, the maximum depth of the two is returned. frozen()[source] Return a frozen copy of this transform node. The frozen copy will not be updated when its children change. Useful for storing a previously known state of a transform where copy.deepcopy() might normally be used. get_affine()[source] Get the affine part of this transform. propertyhas_inverse bool(x) -> bool Returns True when the argument x is true, False otherwise. The builtins True and False are the only two instances of the class bool. The class bool is a subclass of the class int, and cannot be subclassed. input_dims=2 The number of input dimensions of this transform. Must be overridden (with integers) in the subclass. inverted()[source] Return the corresponding inverse transformation. It holds x == self.inverted().transform(self.transform(x)). The return value of this method should be treated as temporary. An update to self does not cause a corresponding update to its inverted copy. propertyis_affine bool(x) -> bool Returns True when the argument x is true, False otherwise. The builtins True and False are the only two instances of the class bool. The class bool is a subclass of the class int, and cannot be subclassed. is_separable=True True if this transform is separable in the x- and y- dimensions. output_dims=2 The number of output dimensions of this transform. Must be overridden (with integers) in the subclass. pass_through=True If pass_through is True, all ancestors will always be invalidated, even if 'self' is already invalid. transform_non_affine(points)[source] Apply only the non-affine part of this transformation. transform(values) is always equivalent to transform_affine(transform_non_affine(values)). In non-affine transformations, this is generally equivalent to transform(values). In affine transformations, this is always a no-op. Parameters valuesarray The input values as NumPy array of length input_dims or shape (N x input_dims). Returns array The output values as NumPy array of length input_dims or shape (N x output_dims), depending on the input.
matplotlib.transformations#matplotlib.transforms.BlendedGenericTransform
__init__(x_transform, y_transform, **kwargs)[source] Create a new "blended" transform using x_transform to transform the x-axis and y_transform to transform the y-axis. You will generally not call this constructor directly but use the blended_transform_factory function instead, which can determine automatically which kind of blended transform to create.
matplotlib.transformations#matplotlib.transforms.BlendedGenericTransform.__init__
__module__='matplotlib.transforms'
matplotlib.transformations#matplotlib.transforms.BlendedGenericTransform.__module__
contains_branch(other)[source] Return whether the given transform is a sub-tree of this transform. This routine uses transform equality to identify sub-trees, therefore in many situations it is object id which will be used. For the case where the given transform represents the whole of this transform, returns True.
matplotlib.transformations#matplotlib.transforms.BlendedGenericTransform.contains_branch
frozen()[source] Return a frozen copy of this transform node. The frozen copy will not be updated when its children change. Useful for storing a previously known state of a transform where copy.deepcopy() might normally be used.
matplotlib.transformations#matplotlib.transforms.BlendedGenericTransform.frozen
get_affine()[source] Get the affine part of this transform.
matplotlib.transformations#matplotlib.transforms.BlendedGenericTransform.get_affine
input_dims=2 The number of input dimensions of this transform. Must be overridden (with integers) in the subclass.
matplotlib.transformations#matplotlib.transforms.BlendedGenericTransform.input_dims
inverted()[source] Return the corresponding inverse transformation. It holds x == self.inverted().transform(self.transform(x)). The return value of this method should be treated as temporary. An update to self does not cause a corresponding update to its inverted copy.
matplotlib.transformations#matplotlib.transforms.BlendedGenericTransform.inverted
is_separable=True True if this transform is separable in the x- and y- dimensions.
matplotlib.transformations#matplotlib.transforms.BlendedGenericTransform.is_separable
output_dims=2 The number of output dimensions of this transform. Must be overridden (with integers) in the subclass.
matplotlib.transformations#matplotlib.transforms.BlendedGenericTransform.output_dims
pass_through=True If pass_through is True, all ancestors will always be invalidated, even if 'self' is already invalid.
matplotlib.transformations#matplotlib.transforms.BlendedGenericTransform.pass_through
transform_non_affine(points)[source] Apply only the non-affine part of this transformation. transform(values) is always equivalent to transform_affine(transform_non_affine(values)). In non-affine transformations, this is generally equivalent to transform(values). In affine transformations, this is always a no-op. Parameters valuesarray The input values as NumPy array of length input_dims or shape (N x input_dims). Returns array The output values as NumPy array of length input_dims or shape (N x output_dims), depending on the input.
matplotlib.transformations#matplotlib.transforms.BlendedGenericTransform.transform_non_affine
matplotlib.transforms.composite_transform_factory(a, b)[source] Create a new composite transform that is the result of applying transform a then transform b. Shortcut versions of the blended transform are provided for the case where both child transforms are affine, or one or the other is the identity transform. Composite transforms may also be created using the '+' operator, e.g.: c = a + b
matplotlib.transformations#matplotlib.transforms.composite_transform_factory
classmatplotlib.transforms.CompositeAffine2D(a, b, **kwargs)[source] Bases: matplotlib.transforms.Affine2DBase A composite transform formed by applying transform a then transform b. This version is an optimization that handles the case where both a and b are 2D affines. 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 transform instance to create. __init__(a, b, **kwargs)[source] 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 transform instance to create. __module__='matplotlib.transforms' __str__()[source] Return str(self). propertydepth Return the number of transforms which have been chained together to form this Transform instance. Note For the special case of a Composite transform, the maximum depth of the two is returned. get_matrix()[source] Get the matrix for the affine part of this transform.
matplotlib.transformations#matplotlib.transforms.CompositeAffine2D
__init__(a, b, **kwargs)[source] 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 transform instance to create.
matplotlib.transformations#matplotlib.transforms.CompositeAffine2D.__init__
__module__='matplotlib.transforms'
matplotlib.transformations#matplotlib.transforms.CompositeAffine2D.__module__
__str__()[source] Return str(self).
matplotlib.transformations#matplotlib.transforms.CompositeAffine2D.__str__
get_matrix()[source] Get the matrix for the affine part of this transform.
matplotlib.transformations#matplotlib.transforms.CompositeAffine2D.get_matrix
classmatplotlib.transforms.CompositeGenericTransform(a, b, **kwargs)[source] Bases: matplotlib.transforms.Transform A composite transform formed by applying transform a then transform b. This "generic" version can handle any two arbitrary transformations. Create a new composite transform that is the result of applying transform a then transform b. You will generally not call this constructor directly but write a + b instead, which will automatically choose the best kind of composite transform instance to create. __eq__(other)[source] Return self==value. __hash__=None __init__(a, b, **kwargs)[source] Create a new composite transform that is the result of applying transform a then transform b. You will generally not call this constructor directly but write a + b instead, which will automatically choose the best kind of composite transform instance to create. __module__='matplotlib.transforms' __str__()[source] Return str(self). propertydepth Return the number of transforms which have been chained together to form this Transform instance. Note For the special case of a Composite transform, the maximum depth of the two is returned. frozen()[source] Return a frozen copy of this transform node. The frozen copy will not be updated when its children change. Useful for storing a previously known state of a transform where copy.deepcopy() might normally be used. get_affine()[source] Get the affine part of this transform. propertyhas_inverse bool(x) -> bool Returns True when the argument x is true, False otherwise. The builtins True and False are the only two instances of the class bool. The class bool is a subclass of the class int, and cannot be subclassed. inverted()[source] Return the corresponding inverse transformation. It holds x == self.inverted().transform(self.transform(x)). The return value of this method should be treated as temporary. An update to self does not cause a corresponding update to its inverted copy. propertyis_affine bool(x) -> bool Returns True when the argument x is true, False otherwise. The builtins True and False are the only two instances of the class bool. The class bool is a subclass of the class int, and cannot be subclassed. propertyis_separable bool(x) -> bool Returns True when the argument x is true, False otherwise. The builtins True and False are the only two instances of the class bool. The class bool is a subclass of the class int, and cannot be subclassed. pass_through=True If pass_through is True, all ancestors will always be invalidated, even if 'self' is already invalid. transform_affine(points)[source] Apply only the affine part of this transformation on the given array of values. transform(values) is always equivalent to transform_affine(transform_non_affine(values)). In non-affine transformations, this is generally a no-op. In affine transformations, this is equivalent to transform(values). Parameters valuesarray The input values as NumPy array of length input_dims or shape (N x input_dims). Returns array The output values as NumPy array of length input_dims or shape (N x output_dims), depending on the input. transform_non_affine(points)[source] Apply only the non-affine part of this transformation. transform(values) is always equivalent to transform_affine(transform_non_affine(values)). In non-affine transformations, this is generally equivalent to transform(values). In affine transformations, this is always a no-op. Parameters valuesarray The input values as NumPy array of length input_dims or shape (N x input_dims). Returns array The output values as NumPy array of length input_dims or shape (N x output_dims), depending on the input. transform_path_non_affine(path)[source] Apply the non-affine part of this transform to Path path, returning a new Path. transform_path(path) is equivalent to transform_path_affine(transform_path_non_affine(values)).
matplotlib.transformations#matplotlib.transforms.CompositeGenericTransform
__eq__(other)[source] Return self==value.
matplotlib.transformations#matplotlib.transforms.CompositeGenericTransform.__eq__
__hash__=None
matplotlib.transformations#matplotlib.transforms.CompositeGenericTransform.__hash__
__init__(a, b, **kwargs)[source] Create a new composite transform that is the result of applying transform a then transform b. You will generally not call this constructor directly but write a + b instead, which will automatically choose the best kind of composite transform instance to create.
matplotlib.transformations#matplotlib.transforms.CompositeGenericTransform.__init__
__module__='matplotlib.transforms'
matplotlib.transformations#matplotlib.transforms.CompositeGenericTransform.__module__
__str__()[source] Return str(self).
matplotlib.transformations#matplotlib.transforms.CompositeGenericTransform.__str__
frozen()[source] Return a frozen copy of this transform node. The frozen copy will not be updated when its children change. Useful for storing a previously known state of a transform where copy.deepcopy() might normally be used.
matplotlib.transformations#matplotlib.transforms.CompositeGenericTransform.frozen
get_affine()[source] Get the affine part of this transform.
matplotlib.transformations#matplotlib.transforms.CompositeGenericTransform.get_affine
inverted()[source] Return the corresponding inverse transformation. It holds x == self.inverted().transform(self.transform(x)). The return value of this method should be treated as temporary. An update to self does not cause a corresponding update to its inverted copy.
matplotlib.transformations#matplotlib.transforms.CompositeGenericTransform.inverted
pass_through=True If pass_through is True, all ancestors will always be invalidated, even if 'self' is already invalid.
matplotlib.transformations#matplotlib.transforms.CompositeGenericTransform.pass_through
transform_affine(points)[source] Apply only the affine part of this transformation on the given array of values. transform(values) is always equivalent to transform_affine(transform_non_affine(values)). In non-affine transformations, this is generally a no-op. In affine transformations, this is equivalent to transform(values). Parameters valuesarray The input values as NumPy array of length input_dims or shape (N x input_dims). Returns array The output values as NumPy array of length input_dims or shape (N x output_dims), depending on the input.
matplotlib.transformations#matplotlib.transforms.CompositeGenericTransform.transform_affine
transform_non_affine(points)[source] Apply only the non-affine part of this transformation. transform(values) is always equivalent to transform_affine(transform_non_affine(values)). In non-affine transformations, this is generally equivalent to transform(values). In affine transformations, this is always a no-op. Parameters valuesarray The input values as NumPy array of length input_dims or shape (N x input_dims). Returns array The output values as NumPy array of length input_dims or shape (N x output_dims), depending on the input.
matplotlib.transformations#matplotlib.transforms.CompositeGenericTransform.transform_non_affine
transform_path_non_affine(path)[source] Apply the non-affine part of this transform to Path path, returning a new Path. transform_path(path) is equivalent to transform_path_affine(transform_path_non_affine(values)).
matplotlib.transformations#matplotlib.transforms.CompositeGenericTransform.transform_path_non_affine
classmatplotlib.transforms.IdentityTransform(*args, **kwargs)[source] Bases: matplotlib.transforms.Affine2DBase A special class that does one thing, the identity transform, in a fast way. Parameters shorthand_namestr A string representing the "name" of the transform. The name carries no significance other than to improve the readability of str(transform) when DEBUG=True. __module__='matplotlib.transforms' __str__()[source] Return str(self). frozen()[source] Return a frozen copy of this transform node. The frozen copy will not be updated when its children change. Useful for storing a previously known state of a transform where copy.deepcopy() might normally be used. get_affine()[source] Get the affine part of this transform. get_matrix()[source] Get the matrix for the affine part of this transform. inverted()[source] Return the corresponding inverse transformation. It holds x == self.inverted().transform(self.transform(x)). The return value of this method should be treated as temporary. An update to self does not cause a corresponding update to its inverted copy. transform(points)[source] Apply this transformation on the given array of values. Parameters valuesarray The input values as NumPy array of length input_dims or shape (N x input_dims). Returns array The output values as NumPy array of length input_dims or shape (N x output_dims), depending on the input. transform_affine(points)[source] Apply only the affine part of this transformation on the given array of values. transform(values) is always equivalent to transform_affine(transform_non_affine(values)). In non-affine transformations, this is generally a no-op. In affine transformations, this is equivalent to transform(values). Parameters valuesarray The input values as NumPy array of length input_dims or shape (N x input_dims). Returns array The output values as NumPy array of length input_dims or shape (N x output_dims), depending on the input. transform_non_affine(points)[source] Apply only the non-affine part of this transformation. transform(values) is always equivalent to transform_affine(transform_non_affine(values)). In non-affine transformations, this is generally equivalent to transform(values). In affine transformations, this is always a no-op. Parameters valuesarray The input values as NumPy array of length input_dims or shape (N x input_dims). Returns array The output values as NumPy array of length input_dims or shape (N x output_dims), depending on the input. transform_path(path)[source] Apply the transform to Path path, returning a new Path. In some cases, this transform may insert curves into the path that began as line segments. transform_path_affine(path)[source] Apply the affine part of this transform to Path path, returning a new Path. transform_path(path) is equivalent to transform_path_affine(transform_path_non_affine(values)). transform_path_non_affine(path)[source] Apply the non-affine part of this transform to Path path, returning a new Path. transform_path(path) is equivalent to transform_path_affine(transform_path_non_affine(values)).
matplotlib.transformations#matplotlib.transforms.IdentityTransform
__module__='matplotlib.transforms'
matplotlib.transformations#matplotlib.transforms.IdentityTransform.__module__
__str__()[source] Return str(self).
matplotlib.transformations#matplotlib.transforms.IdentityTransform.__str__
frozen()[source] Return a frozen copy of this transform node. The frozen copy will not be updated when its children change. Useful for storing a previously known state of a transform where copy.deepcopy() might normally be used.
matplotlib.transformations#matplotlib.transforms.IdentityTransform.frozen
get_affine()[source] Get the affine part of this transform.
matplotlib.transformations#matplotlib.transforms.IdentityTransform.get_affine
get_matrix()[source] Get the matrix for the affine part of this transform.
matplotlib.transformations#matplotlib.transforms.IdentityTransform.get_matrix
inverted()[source] Return the corresponding inverse transformation. It holds x == self.inverted().transform(self.transform(x)). The return value of this method should be treated as temporary. An update to self does not cause a corresponding update to its inverted copy.
matplotlib.transformations#matplotlib.transforms.IdentityTransform.inverted
transform(points)[source] Apply this transformation on the given array of values. Parameters valuesarray The input values as NumPy array of length input_dims or shape (N x input_dims). Returns array The output values as NumPy array of length input_dims or shape (N x output_dims), depending on the input.
matplotlib.transformations#matplotlib.transforms.IdentityTransform.transform
transform_affine(points)[source] Apply only the affine part of this transformation on the given array of values. transform(values) is always equivalent to transform_affine(transform_non_affine(values)). In non-affine transformations, this is generally a no-op. In affine transformations, this is equivalent to transform(values). Parameters valuesarray The input values as NumPy array of length input_dims or shape (N x input_dims). Returns array The output values as NumPy array of length input_dims or shape (N x output_dims), depending on the input.
matplotlib.transformations#matplotlib.transforms.IdentityTransform.transform_affine
transform_non_affine(points)[source] Apply only the non-affine part of this transformation. transform(values) is always equivalent to transform_affine(transform_non_affine(values)). In non-affine transformations, this is generally equivalent to transform(values). In affine transformations, this is always a no-op. Parameters valuesarray The input values as NumPy array of length input_dims or shape (N x input_dims). Returns array The output values as NumPy array of length input_dims or shape (N x output_dims), depending on the input.
matplotlib.transformations#matplotlib.transforms.IdentityTransform.transform_non_affine
transform_path(path)[source] Apply the transform to Path path, returning a new Path. In some cases, this transform may insert curves into the path that began as line segments.
matplotlib.transformations#matplotlib.transforms.IdentityTransform.transform_path
transform_path_affine(path)[source] Apply the affine part of this transform to Path path, returning a new Path. transform_path(path) is equivalent to transform_path_affine(transform_path_non_affine(values)).
matplotlib.transformations#matplotlib.transforms.IdentityTransform.transform_path_affine
transform_path_non_affine(path)[source] Apply the non-affine part of this transform to Path path, returning a new Path. transform_path(path) is equivalent to transform_path_affine(transform_path_non_affine(values)).
matplotlib.transformations#matplotlib.transforms.IdentityTransform.transform_path_non_affine
matplotlib.transforms.interval_contains(interval, val)[source] Check, inclusively, whether an interval includes a given value. Parameters interval(float, float) The endpoints of the interval. valfloat Value to check is within interval. Returns bool Whether val is within the interval.
matplotlib.transformations#matplotlib.transforms.interval_contains
matplotlib.transforms.interval_contains_open(interval, val)[source] Check, excluding endpoints, whether an interval includes a given value. Parameters interval(float, float) The endpoints of the interval. valfloat Value to check is within interval. Returns bool Whether val is within the interval.
matplotlib.transformations#matplotlib.transforms.interval_contains_open
classmatplotlib.transforms.LockableBbox(bbox, x0=None, y0=None, x1=None, y1=None, **kwargs)[source] Bases: matplotlib.transforms.BboxBase A Bbox where some elements may be locked at certain values. When the child bounding box changes, the bounds of this bbox will update accordingly with the exception of the locked elements. Parameters bboxBbox The child bounding box to wrap. x0float or None The locked value for x0, or None to leave unlocked. y0float or None The locked value for y0, or None to leave unlocked. x1float or None The locked value for x1, or None to leave unlocked. y1float or None The locked value for y1, or None to leave unlocked. __init__(bbox, x0=None, y0=None, x1=None, y1=None, **kwargs)[source] Parameters bboxBbox The child bounding box to wrap. x0float or None The locked value for x0, or None to leave unlocked. y0float or None The locked value for y0, or None to leave unlocked. x1float or None The locked value for x1, or None to leave unlocked. y1float or None The locked value for y1, or None to leave unlocked. __module__='matplotlib.transforms' __str__()[source] Return str(self). get_points()[source] propertylocked_x0 float or None: The value used for the locked x0. propertylocked_x1 float or None: The value used for the locked x1. propertylocked_y0 float or None: The value used for the locked y0. propertylocked_y1 float or None: The value used for the locked y1.
matplotlib.transformations#matplotlib.transforms.LockableBbox
__init__(bbox, x0=None, y0=None, x1=None, y1=None, **kwargs)[source] Parameters bboxBbox The child bounding box to wrap. x0float or None The locked value for x0, or None to leave unlocked. y0float or None The locked value for y0, or None to leave unlocked. x1float or None The locked value for x1, or None to leave unlocked. y1float or None The locked value for y1, or None to leave unlocked.
matplotlib.transformations#matplotlib.transforms.LockableBbox.__init__
__module__='matplotlib.transforms'
matplotlib.transformations#matplotlib.transforms.LockableBbox.__module__
__str__()[source] Return str(self).
matplotlib.transformations#matplotlib.transforms.LockableBbox.__str__
get_points()[source]
matplotlib.transformations#matplotlib.transforms.LockableBbox.get_points
matplotlib.transforms.nonsingular(vmin, vmax, expander=0.001, tiny=1e-15, increasing=True)[source] Modify the endpoints of a range as needed to avoid singularities. Parameters vmin, vmaxfloat The initial endpoints. expanderfloat, default: 0.001 Fractional amount by which vmin and vmax are expanded if the original interval is too small, based on tiny. tinyfloat, default: 1e-15 Threshold for the ratio of the interval to the maximum absolute value of its endpoints. If the interval is smaller than this, it will be expanded. This value should be around 1e-15 or larger; otherwise the interval will be approaching the double precision resolution limit. increasingbool, default: True If True, swap vmin, vmax if vmin > vmax. Returns vmin, vmaxfloat Endpoints, expanded and/or swapped if necessary. If either input is inf or NaN, or if both inputs are 0 or very close to zero, it returns -expander, expander.
matplotlib.transformations#matplotlib.transforms.nonsingular
matplotlib.transforms.offset_copy(trans, fig=None, x=0.0, y=0.0, units='inches')[source] Return a new transform with an added offset. Parameters transTransform subclass Any transform, to which offset will be applied. figFigure, default: None Current figure. It can be None if units are 'dots'. x, yfloat, default: 0.0 The offset to apply. units{'inches', 'points', 'dots'}, default: 'inches' Units of the offset. Returns Transform subclass Transform with applied offset.
matplotlib.transformations#matplotlib.transforms.offset_copy
classmatplotlib.transforms.ScaledTranslation(xt, yt, scale_trans, **kwargs)[source] Bases: matplotlib.transforms.Affine2DBase A transformation that translates by xt and yt, after xt and yt have been transformed by scale_trans. Parameters shorthand_namestr A string representing the "name" of the transform. The name carries no significance other than to improve the readability of str(transform) when DEBUG=True. __init__(xt, yt, scale_trans, **kwargs)[source] Parameters shorthand_namestr A string representing the "name" of the transform. The name carries no significance other than to improve the readability of str(transform) when DEBUG=True. __module__='matplotlib.transforms' __str__()[source] Return str(self). get_matrix()[source] Get the matrix for the affine part of this transform.
matplotlib.transformations#matplotlib.transforms.ScaledTranslation
__init__(xt, yt, scale_trans, **kwargs)[source] Parameters shorthand_namestr A string representing the "name" of the transform. The name carries no significance other than to improve the readability of str(transform) when DEBUG=True.
matplotlib.transformations#matplotlib.transforms.ScaledTranslation.__init__
__module__='matplotlib.transforms'
matplotlib.transformations#matplotlib.transforms.ScaledTranslation.__module__
__str__()[source] Return str(self).
matplotlib.transformations#matplotlib.transforms.ScaledTranslation.__str__
get_matrix()[source] Get the matrix for the affine part of this transform.
matplotlib.transformations#matplotlib.transforms.ScaledTranslation.get_matrix
classmatplotlib.transforms.Transform(shorthand_name=None)[source] Bases: matplotlib.transforms.TransformNode The base class of all TransformNode instances that actually perform a transformation. All non-affine transformations should be subclasses of this class. New affine transformations should be subclasses of Affine2D. Subclasses of this class should override the following members (at minimum): input_dims output_dims transform() inverted() (if an inverse exists) The following attributes may be overridden if the default is unsuitable: is_separable (defaults to True for 1D -> 1D transforms, False otherwise) has_inverse (defaults to True if inverted() is overridden, False otherwise) If the transform needs to do something non-standard with matplotlib.path.Path objects, such as adding curves where there were once line segments, it should override: transform_path() Parameters shorthand_namestr A string representing the "name" of the transform. The name carries no significance other than to improve the readability of str(transform) when DEBUG=True. __add__(other)[source] Compose two transforms together so that self is followed by other. A + B returns a transform C so that C.transform(x) == B.transform(A.transform(x)). __array__(*args, **kwargs)[source] Array interface to get at this Transform's affine matrix. classmethod__init_subclass__()[source] This method is called when a class is subclassed. The default implementation does nothing. It may be overridden to extend subclasses. __module__='matplotlib.transforms' __sub__(other)[source] Compose self with the inverse of other, cancelling identical terms if any: # In general: A - B == A + B.inverted() # (but see note regarding frozen transforms below). # If A "ends with" B (i.e. A == A' + B for some A') we can cancel # out B: (A' + B) - B == A' # Likewise, if B "starts with" A (B = A + B'), we can cancel out A: A - (A + B') == B'.inverted() == B'^-1 Cancellation (rather than naively returning A + B.inverted()) is important for multiple reasons: It avoids floating-point inaccuracies when computing the inverse of B: B - B is guaranteed to cancel out exactly (resulting in the identity transform), whereas B + B.inverted() may differ by a small epsilon. B.inverted() always returns a frozen transform: if one computes A + B + B.inverted() and later mutates B, then B.inverted() won't be updated and the last two terms won't cancel out anymore; on the other hand, A + B - B will always be equal to A even if B is mutated. contains_branch(other)[source] Return whether the given transform is a sub-tree of this transform. This routine uses transform equality to identify sub-trees, therefore in many situations it is object id which will be used. For the case where the given transform represents the whole of this transform, returns True. contains_branch_seperately(other_transform)[source] Return whether the given branch is a sub-tree of this transform on each separate dimension. A common use for this method is to identify if a transform is a blended transform containing an axes' data transform. e.g.: x_isdata, y_isdata = trans.contains_branch_seperately(ax.transData) propertydepth Return the number of transforms which have been chained together to form this Transform instance. Note For the special case of a Composite transform, the maximum depth of the two is returned. get_affine()[source] Get the affine part of this transform. get_matrix()[source] Get the matrix for the affine part of this transform. has_inverse=False True if this transform has a corresponding inverse transform. input_dims=None The number of input dimensions of this transform. Must be overridden (with integers) in the subclass. inverted()[source] Return the corresponding inverse transformation. It holds x == self.inverted().transform(self.transform(x)). The return value of this method should be treated as temporary. An update to self does not cause a corresponding update to its inverted copy. is_separable=False True if this transform is separable in the x- and y- dimensions. output_dims=None The number of output dimensions of this transform. Must be overridden (with integers) in the subclass. transform(values)[source] Apply this transformation on the given array of values. Parameters valuesarray The input values as NumPy array of length input_dims or shape (N x input_dims). Returns array The output values as NumPy array of length input_dims or shape (N x output_dims), depending on the input. transform_affine(values)[source] Apply only the affine part of this transformation on the given array of values. transform(values) is always equivalent to transform_affine(transform_non_affine(values)). In non-affine transformations, this is generally a no-op. In affine transformations, this is equivalent to transform(values). Parameters valuesarray The input values as NumPy array of length input_dims or shape (N x input_dims). Returns array The output values as NumPy array of length input_dims or shape (N x output_dims), depending on the input. transform_angles(angles, pts, radians=False, pushoff=1e-05)[source] Transform a set of angles anchored at specific locations. Parameters angles(N,) array-like The angles to transform. pts(N, 2) array-like The points where the angles are anchored. radiansbool, default: False Whether angles are radians or degrees. pushofffloat For each point in pts and angle in angles, the transformed angle is computed by transforming a segment of length pushoff starting at that point and making that angle relative to the horizontal axis, and measuring the angle between the horizontal axis and the transformed segment. Returns (N,) array transform_bbox(bbox)[source] Transform the given bounding box. For smarter transforms including caching (a common requirement in Matplotlib), see TransformedBbox. transform_non_affine(values)[source] Apply only the non-affine part of this transformation. transform(values) is always equivalent to transform_affine(transform_non_affine(values)). In non-affine transformations, this is generally equivalent to transform(values). In affine transformations, this is always a no-op. Parameters valuesarray The input values as NumPy array of length input_dims or shape (N x input_dims). Returns array The output values as NumPy array of length input_dims or shape (N x output_dims), depending on the input. transform_path(path)[source] Apply the transform to Path path, returning a new Path. In some cases, this transform may insert curves into the path that began as line segments. transform_path_affine(path)[source] Apply the affine part of this transform to Path path, returning a new Path. transform_path(path) is equivalent to transform_path_affine(transform_path_non_affine(values)). transform_path_non_affine(path)[source] Apply the non-affine part of this transform to Path path, returning a new Path. transform_path(path) is equivalent to transform_path_affine(transform_path_non_affine(values)). transform_point(point)[source] Return a transformed point. This function is only kept for backcompatibility; the more general transform method is capable of transforming both a list of points and a single point. The point is given as a sequence of length input_dims. The transformed point is returned as a sequence of length output_dims.
matplotlib.transformations#matplotlib.transforms.Transform
__add__(other)[source] Compose two transforms together so that self is followed by other. A + B returns a transform C so that C.transform(x) == B.transform(A.transform(x)).
matplotlib.transformations#matplotlib.transforms.Transform.__add__
__array__(*args, **kwargs)[source] Array interface to get at this Transform's affine matrix.
matplotlib.transformations#matplotlib.transforms.Transform.__array__
classmethod__init_subclass__()[source] This method is called when a class is subclassed. The default implementation does nothing. It may be overridden to extend subclasses.
matplotlib.transformations#matplotlib.transforms.Transform.__init_subclass__
__module__='matplotlib.transforms'
matplotlib.transformations#matplotlib.transforms.Transform.__module__
__sub__(other)[source] Compose self with the inverse of other, cancelling identical terms if any: # In general: A - B == A + B.inverted() # (but see note regarding frozen transforms below). # If A "ends with" B (i.e. A == A' + B for some A') we can cancel # out B: (A' + B) - B == A' # Likewise, if B "starts with" A (B = A + B'), we can cancel out A: A - (A + B') == B'.inverted() == B'^-1 Cancellation (rather than naively returning A + B.inverted()) is important for multiple reasons: It avoids floating-point inaccuracies when computing the inverse of B: B - B is guaranteed to cancel out exactly (resulting in the identity transform), whereas B + B.inverted() may differ by a small epsilon. B.inverted() always returns a frozen transform: if one computes A + B + B.inverted() and later mutates B, then B.inverted() won't be updated and the last two terms won't cancel out anymore; on the other hand, A + B - B will always be equal to A even if B is mutated.
matplotlib.transformations#matplotlib.transforms.Transform.__sub__
contains_branch(other)[source] Return whether the given transform is a sub-tree of this transform. This routine uses transform equality to identify sub-trees, therefore in many situations it is object id which will be used. For the case where the given transform represents the whole of this transform, returns True.
matplotlib.transformations#matplotlib.transforms.Transform.contains_branch
contains_branch_seperately(other_transform)[source] Return whether the given branch is a sub-tree of this transform on each separate dimension. A common use for this method is to identify if a transform is a blended transform containing an axes' data transform. e.g.: x_isdata, y_isdata = trans.contains_branch_seperately(ax.transData)
matplotlib.transformations#matplotlib.transforms.Transform.contains_branch_seperately
get_affine()[source] Get the affine part of this transform.
matplotlib.transformations#matplotlib.transforms.Transform.get_affine
get_matrix()[source] Get the matrix for the affine part of this transform.
matplotlib.transformations#matplotlib.transforms.Transform.get_matrix
has_inverse=False True if this transform has a corresponding inverse transform.
matplotlib.transformations#matplotlib.transforms.Transform.has_inverse
input_dims=None The number of input dimensions of this transform. Must be overridden (with integers) in the subclass.
matplotlib.transformations#matplotlib.transforms.Transform.input_dims