Bases: matplotlib.ticker.Formatter
Format tick values as a number.
Whether to use offset notation. See set_useOffset.
Whether to use fancy math formatting. See set_useMathText.
Whether to use locale settings for decimal sign and positive sign. See set_useLocale.
In addition to the parameters above, the formatting of scientific vs. floating point representation can be configured via set_scientific and set_powerlimits).
Offset notation and scientific notation
Offset notation and scientific notation look quite similar at first sight. Both split some information from the formatted tick values and display it at the end of the axis.
The following plot with x limits 1_000_000 to 1_000_010 illustrates the different formatting. Note the labels at the right edge of the x axis.
(Source code, png, pdf)
Return the full string representation of the value with the position unspecified.
Return a short string version of the tick value.
Defaults to the position-independent long value.
Return scientific notation, plus offset.
Return whether locale settings are used for formatting.
See also
Return whether to use fancy math formatting.
See also
Return whether automatic mode for offset notation is active.
This returns True if set_useOffset(True); it returns False if an explicit offset was set, e.g. set_useOffset(1000).
See also
Set the locations of the ticks.
This method is called before computing the tick labels because some formatters need to know all tick locations to do so.
Set size thresholds for scientific notation.
A tuple (min_exp, max_exp) containing the powers of 10 that determine the switchover threshold. For a number representable as \(a \times 10^\mathrm{exp}\) with \(1 <= |a| < 10\), scientific notation will be used if exp <= min_exp or exp >= max_exp.
The default limits are controlled by rcParams["axes.formatter.limits"] (default: [-5, 6]).
In particular numbers with exp equal to the thresholds are written in scientific notation.
Typically, min_exp will be negative and max_exp will be positive.
For example, formatter.set_powerlimits((-3, 4)) will provide the following formatting: \(1 \times 10^{-3}, 9.9 \times 10^{-3}, 0.01,\) \(9999, 1 \times 10^4\).
See also
Turn scientific notation on or off.
See also
Set whether to use locale settings for decimal sign and positive sign.
None resets to rcParams["axes.formatter.use_locale"] (default: False).
Set whether to use fancy math formatting.
If active, scientific notation is formatted as \(1.2 \times 10^3\).
None resets to rcParams["axes.formatter.use_mathtext"] (default: False).
Set whether to use offset notation.
When formatting a set numbers whose value is large compared to their range, the formatter can separate an additive constant. This can shorten the formatted numbers so that they are less likely to overlap when drawn on an axis.
With active offset notation, the values
100_000, 100_002, 100_004, 100_006, 100_008
will be formatted as 0, 2, 4, 6, 8 plus an offset +1e5, which is written to the edge of the axis.
Return whether locale settings are used for formatting.
See also
Return whether to use fancy math formatting.
See also
Return whether automatic mode for offset notation is active.
This returns True if set_useOffset(True); it returns False if an explicit offset was set, e.g. set_useOffset(1000).
See also


Return the full string representation of the value with the position unspecified.


Return a short string version of the tick value.
Defaults to the position-independent long value.


Return scientific notation, plus offset.


Return whether locale settings are used for formatting.
See also


Return whether to use fancy math formatting.
See also


Return whether automatic mode for offset notation is active.
This returns True if set_useOffset(True); it returns False if an explicit offset was set, e.g. set_useOffset(1000).
See also


Set the locations of the ticks.
This method is called before computing the tick labels because some formatters need to know all tick locations to do so.


Set size thresholds for scientific notation.
A tuple (min_exp, max_exp) containing the powers of 10 that determine the switchover threshold. For a number representable as \(a \times 10^\mathrm{exp}\) with \(1 <= |a| < 10\), scientific notation will be used if exp <= min_exp or exp >= max_exp.
The default limits are controlled by rcParams["axes.formatter.limits"] (default: [-5, 6]).
In particular numbers with exp equal to the thresholds are written in scientific notation.
Typically, min_exp will be negative and max_exp will be positive.
For example, formatter.set_powerlimits((-3, 4)) will provide the following formatting: \(1 \times 10^{-3}, 9.9 \times 10^{-3}, 0.01,\) \(9999, 1 \times 10^4\).
See also


Turn scientific notation on or off.
See also


Set whether to use locale settings for decimal sign and positive sign.
None resets to rcParams["axes.formatter.use_locale"] (default: False).


Set whether to use fancy math formatting.
If active, scientific notation is formatted as \(1.2 \times 10^3\).
None resets to rcParams["axes.formatter.use_mathtext"] (default: False).


Set whether to use offset notation.
When formatting a set numbers whose value is large compared to their range, the formatter can separate an additive constant. This can shorten the formatted numbers so that they are less likely to overlap when drawn on an axis.
With active offset notation, the values
100_000, 100_002, 100_004, 100_006, 100_008
will be formatted as 0, 2, 4, 6, 8 plus an offset +1e5, which is written to the edge of the axis.


Bases: matplotlib.ticker.Formatter
Use a new-style format string (as used by str.format) to format the tick.
The field used for the tick value must be labeled x and the field used for the tick position must be labeled pos.


Bases: matplotlib.ticker.Locator
Determine the tick locations for symmetric log axes.
If set, defines the base and linthresh of the symlog transform.
The base and linthresh of the symlog transform, as documented for SymmetricalLogScale. These parameters are only used if transform is not set.
The multiples of integer powers of the base where ticks are placed, i.e., ticks are placed at [sub * base**i for i in ... for sub in subs].
Either transform, or both base and linthresh, must be given.
Set parameters within this locator.
Return the values of the located ticks given vmin and vmax.
Note
To get tick locations with the vmin and vmax values defined automatically for the associated axis simply call the Locator instance:
Try to choose the view limits intelligently.


Return the values of the located ticks given vmin and vmax.
Note
To get tick locations with the vmin and vmax values defined automatically for the associated axis simply call the Locator instance:


Try to choose the view limits intelligently.


Bases: object
[Deprecated]
Deprecated since version 3.5:
[Deprecated]
Deprecated since version 3.5:
[Deprecated]
Deprecated since version 3.5:


[Deprecated]
Deprecated since version 3.5:


Helper module for the bbox_inches parameter in Figure.savefig.
Temporarily adjust the figure so that only the specified area (bbox_inches) is saved.
It modifies fig.bbox, fig.bbox_inches, fig.transFigure._boxout, and fig.patch. While the figure size changes, the scale of the original figure is conserved. A function which restores the original values are returned.
A function that needs to be called when figure dpi changes during the drawing (e.g., rasterizing). It recovers the bbox and re-adjust it with the new dpi.


Temporarily adjust the figure so that only the specified area (bbox_inches) is saved.
It modifies fig.bbox, fig.bbox_inches, fig.transFigure._boxout, and fig.patch. While the figure size changes, the scale of the original figure is conserved. A function which restores the original values are returned.


A function that needs to be called when figure dpi changes during the drawing (e.g., rasterizing). It recovers the bbox and re-adjust it with the new dpi.


Routines to adjust subplot params so that subplots are nicely fit in the figure. In doing so, only axis labels, tick labels, axes titles and offsetboxes that are anchored to axes are currently considered.
Internally, this module assumes that the margins (left margin, etc.) which are differences between Axes.get_tightbbox and Axes.bbox are independent of Axes position. This may fail if Axes.adjustable is datalim as well as such cases as when left or right margin are affected by xlabel.
[Deprecated] Return a dict of subplot parameters to adjust spacing between subplots or None if resulting axes would have zero height or width.
Note that this function ignores geometry information of subplot itself, but uses what is given by the nrows_ncols and num1num2_list parameters. Also, the results could be incorrect if some subplots have adjustable=datalim.
Number of rows and number of columns of the grid.
List of numbers specifying the area occupied by the subplot
List of subplots that will be used to calculate optimal subplot_params.
Padding between the figure edge and the edges of subplots, as a fraction of the font size.
Padding (height/width) between edges of adjacent subplots, as a fraction of the font size. Defaults to pad.
[left, bottom, right, top] in normalized (0, 1) figure coordinates.
Deprecated since version 3.5.
Return a list of subplotspec from the given list of axes.
For an instance of axes that does not support subplotspec, None is inserted in the list.
If grid_spec is given, None is inserted for those not from the given grid_spec.
Return subplot parameters for tight-layouted-figure with specified padding.
The subplotspecs of each axes.
Padding between the figure edge and the edges of subplots, as a fraction of the font size.
Padding (height/width) between edges of adjacent subplots. Defaults to pad.
(left, bottom, right, top) rectangle in normalized figure coordinates that the whole subplots area (including labels) will fit into. Defaults to using the entire figure.
subplotspec kwargs to be passed to Figure.subplots_adjust or None if tight_layout could not be accomplished.


[Deprecated] Return a dict of subplot parameters to adjust spacing between subplots or None if resulting axes would have zero height or width.
Note that this function ignores geometry information of subplot itself, but uses what is given by the nrows_ncols and num1num2_list parameters. Also, the results could be incorrect if some subplots have adjustable=datalim.
Number of rows and number of columns of the grid.
List of numbers specifying the area occupied by the subplot
List of subplots that will be used to calculate optimal subplot_params.
Padding between the figure edge and the edges of subplots, as a fraction of the font size.
Padding (height/width) between edges of adjacent subplots, as a fraction of the font size. Defaults to pad.
[left, bottom, right, top] in normalized (0, 1) figure coordinates.
Deprecated since version 3.5.


Return a list of subplotspec from the given list of axes.
For an instance of axes that does not support subplotspec, None is inserted in the list.
If grid_spec is given, None is inserted for those not from the given grid_spec.


Return subplot parameters for tight-layouted-figure with specified padding.
The subplotspecs of each axes.
Padding between the figure edge and the edges of subplots, as a fraction of the font size.
Padding (height/width) between edges of adjacent subplots. Defaults to pad.
(left, bottom, right, top) rectangle in normalized figure coordinates that the whole subplots area (including labels) will fit into. Defaults to using the entire figure.
subplotspec kwargs to be passed to Figure.subplots_adjust or None if tight_layout could not be accomplished.


Matplotlib includes a framework for arbitrary geometric transformations that is used determine the final position of all elements drawn on the canvas.
Transforms are composed into trees of TransformNode objects whose actual value depends on their children. When the contents of children change, their parents are automatically invalidated. The next time an invalidated transform is accessed, it is recomputed to reflect those changes. This invalidation/caching approach prevents unnecessary recomputations of transforms, and contributes to better interactive performance.
For example, here is a graph of the transform tree used to plot data to the graph:
The framework can be used for both affine and non-affine transformations. However, for speed, we want use the backend renderers to perform affine transformations whenever possible. Therefore, it is possible to perform just the affine or non-affine part of a transformation on a set of data. The affine is always assumed to occur after the non-affine. For any transform:
The backends are not expected to handle non-affine transformations themselves.
Bases: matplotlib.transforms.Affine2DBase
A mutable 2D affine transformation.
Initialize an Affine transform from a 3x3 numpy float array:
If matrix is None, initialize with the identity transform.
Initialize an Affine transform from a 3x3 numpy float array:
If matrix is None, initialize with the identity transform.
Return str(self).
Reset the underlying matrix to the identity transform.
Create a new Affine2D instance from the given values:
.
Get the underlying transformation matrix as a 3x3 numpy array:
.
Return a new Affine2D object that is the identity transform.
Unless this transform will be mutated later on, consider using the faster IdentityTransform class instead.
Add a rotation (in radians) to this transform in place.
Returns self, so this method can easily be chained with more calls to rotate(), rotate_deg(), translate() and scale().
Add a rotation (in radians) around the point (x, y) in place.
Returns self, so this method can easily be chained with more calls to rotate(), rotate_deg(), translate() and scale().
Add a rotation (in degrees) to this transform in place.
Returns self, so this method can easily be chained with more calls to rotate(), rotate_deg(), translate() and scale().
Add a rotation (in degrees) around the point (x, y) in place.
Returns self, so this method can easily be chained with more calls to rotate(), rotate_deg(), translate() and scale().
Add a scale in place.
If sy is None, the same scale is applied in both the x- and y-directions.
Returns self, so this method can easily be chained with more calls to rotate(), rotate_deg(), translate() and scale().
Set this transformation from the frozen copy of another Affine2DBase object.
Set the underlying transformation matrix from a 3x3 numpy array:
.
Add a skew in place.
xShear and yShear are the shear angles along the x- and y-axes, respectively, in radians.
Returns self, so this method can easily be chained with more calls to rotate(), rotate_deg(), translate() and scale().
Add a skew in place.
xShear and yShear are the shear angles along the x- and y-axes, respectively, in degrees.
Returns self, so this method can easily be chained with more calls to rotate(), rotate_deg(), translate() and scale().
Add a translation in place.
Returns self, so this method can easily be chained with more calls to rotate(), rotate_deg(), translate() and scale().
Bases: matplotlib.transforms.AffineBase
The base class of all 2D affine transformations.
2D affine transformations are performed using a 3x3 numpy array:
This class provides the read-only interface. For a mutable 2D affine transformation, use Affine2D.
Subclasses of this class will generally only need to override a constructor and get_matrix() that generates a custom 3x3 matrix.
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.
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.
True if this transform has a corresponding inverse transform.
The number of input dimensions of this transform. Must be overridden (with integers) in the subclass.
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.
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.
The number of output dimensions of this transform. Must be overridden (with integers) in the subclass.
Return the values of the matrix as an (a, b, c, d, e, f) tuple.
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).
The input values as NumPy array of length input_dims or shape (N x input_dims).
The output values as NumPy array of length input_dims or shape (N x output_dims), depending on the input.
Bases: matplotlib.transforms.Transform
The base class of all affine transformations of any number of dimensions.
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.
Array interface to get at this Transform's affine matrix.
Return self==value.
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.
Get the affine part of this transform.
Apply this transformation on the given array of values.
The input values as NumPy array of length input_dims or shape (N x input_dims).
The output values as NumPy array of length input_dims or shape (N x output_dims), depending on the input.
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).
The input values as NumPy array of length input_dims or shape (N x input_dims).
The output values as NumPy array of length input_dims or shape (N x output_dims), depending on the input.
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.
The input values as NumPy array of length input_dims or shape (N x input_dims).
The output values as NumPy array of length input_dims or shape (N x output_dims), depending on the input.
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.
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)).
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)).
Bases: matplotlib.transforms.Affine2DBase
A transform wrapper for transforming displacements between pairs of points.
This class is intended to be used to transform displacements ("position deltas") between pairs of points (e.g., as the offset_transform of Collections): given a transform t such that t =
AffineDeltaTransform(t) + offset, AffineDeltaTransform satisfies AffineDeltaTransform(a - b) == AffineDeltaTransform(a) -
AffineDeltaTransform(b).
This is implemented by forcing the offset components of the transform matrix to zero.
This class is experimental as of 3.3, and the API may change.
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.
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.
Return str(self).
Get the matrix for the affine part of this transform.
Bases: matplotlib.transforms.BboxBase
A mutable bounding box.
Create from known bounds
The default constructor takes the boundary "points" [[xmin, ymin],
[xmax, ymax]].
Alternatively, a Bbox can be created from the flattened points array, the so-called "extents" (xmin, ymin, xmax, ymax)
or from the "bounds" (xmin, ymin, width, height).
Create from collections of points
The "empty" object for accumulating Bboxs is the null bbox, which is a stand-in for the empty set.
Adding points to the null bbox will give you the bbox of those points.
Setting ignore=True is equivalent to starting over from a null bbox.
Warning
It is recommended to always specify ignore explicitly. If not, the default value of ignore can be changed at any time by code with access to your Bbox, for example using the method ignore.
Properties of the ``null`` bbox
Note
The current behavior of Bbox.null() may be surprising as it does not have all of the properties of the "empty set", and as such does not behave like a "zero" object in the mathematical sense. We may change that in the future (with a deprecation period).
The null bbox is the identity for intersections
except with itself, where it returns the full space.
A union containing null will always return the full space (not the other set!)
A 2x2 numpy array of the form [[x0, y0], [x1, y1]].
Default object formatter.
A 2x2 numpy array of the form [[x0, y0], [x1, y1]].
Return repr(self).
Return str(self).
Return (x0, y0, width, height).
Create a new Bbox from x0, y0, width and height.
width and height may be negative.
Create a new Bbox from left, bottom, right and top.
The y-axis increases upwards.
The four extents of the bounding box.
If this is supplied, the Bbox will have a minimum positive value set. This is useful when dealing with logarithmic scales and other scales where negative bounds result in floating point errors.
The base class for anything that participates in the transform tree and needs to invalidate its parents or be invalidated. This includes classes that are not really transforms, such as bounding boxes, since some transforms depend on bounding boxes to compute their values.
Get the points of the bounding box directly as a numpy array of the form: [[x0, y0], [x1, y1]].
Set whether the existing bounds of the box should be ignored by subsequent calls to update_from_data_xy().
The pair of x coordinates that define the bounding box.
This is not guaranteed to be sorted from left to right.
The pair of y coordinates that define the bounding box.
This is not guaranteed to be sorted from bottom to top.
The minimum positive value in both directions within the Bbox.
This is useful when dealing with logarithmic scales and other scales where negative bounds result in floating point errors, and will be used as the minimum extent instead of p0.
The minimum positive value in the x-direction within the Bbox.
This is useful when dealing with logarithmic scales and other scales where negative bounds result in floating point errors, and will be used as the minimum x-extent instead of x0.
The minimum positive value in the y-direction within the Bbox.
This is useful when dealing with logarithmic scales and other scales where negative bounds result in floating point errors, and will be used as the minimum y-extent instead of y0.
Return whether the bbox has changed since init.
Return whether the x-limits have changed since init.
Return whether the y-limits have changed since init.
Create a new null Bbox from (inf, inf) to (-inf, -inf).
The first pair of (x, y) coordinates that define the bounding box.
This is not guaranteed to be the bottom-left corner (for that, use min).
The second pair of (x, y) coordinates that define the bounding box.
This is not guaranteed to be the top-right corner (for that, use max).
Set this bounding box from the "frozen" bounds of another Bbox.
Set the points of the bounding box directly from a numpy array of the form: [[x0, y0], [x1, y1]]. No error checking is performed, as this method is mainly for internal use.
Create a new unit Bbox from (0, 0) to (1, 1).
Update the x-bounds of the Bbox based on the passed in data. After updating, the bounds will have positive width, and x0 will be the minimal value.
Array of x-values.
Update the bounds of the Bbox based on the passed in data. After updating, the bounds will have positive width and height; x0 and y0 will be the minimal values.
A numpy array of 2D points.
When True, update the x/y values.
Update the y-bounds of the Bbox based on the passed in data. After updating, the bounds will have positive height, and y0 will be the minimal value.
Array of y-values.
Update the bounds of the Bbox to contain the vertices of the provided path. After updating, the bounds will have positive width and height; x0 and y0 will be the minimal values.
When True, update the x/y values.
The first of the pair of x coordinates that define the bounding box.
This is not guaranteed to be less than x1 (for that, use xmin).
The second of the pair of x coordinates that define the bounding box.
This is not guaranteed to be greater than x0 (for that, use xmax).
The first of the pair of y coordinates that define the bounding box.
This is not guaranteed to be less than y1 (for that, use ymin).
The second of the pair of y coordinates that define the bounding box.
This is not guaranteed to be greater than y0 (for that, use ymax).
Bases: matplotlib.transforms.TransformNode
The base class of all bounding boxes.
This class is immutable; Bbox is a mutable subclass.
The canonical representation is as two points, with no restrictions on their ordering. Convenience properties are provided to get the left, bottom, right and top edges and width and height, but these are not stored explicitly.
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.
Return a copy of the Bbox anchored to c within container.
Either an (x, y) pair of relative coordinates (0 is left or bottom, 1 is right or top), 'C' (center), or a cardinal direction ('SW', southwest, is bottom left, etc.).
The box within which the Bbox is positioned; it defaults to the initial Bbox.
See also
Return (x0, y0, width, height).
Return whether (x, y) is in the bounding box or on its edge.
Return whether x is in the closed (x0, x1) interval.
Return whether y is in the closed (y0, y1) interval.
Return the corners of this rectangle as an array of points.
Specifically, this returns the array [[x0, y0], [x0, y1], [x1, y0], [x1, y1]].
Count the number of vertices contained in the Bbox. Any vertices with a non-finite x or y value are ignored.
Count the number of bounding boxes that overlap this one.
Construct a Bbox by expanding this one around its center by the factors sw and sh.
Return (x0, y0, x1, y1).
The base class for anything that participates in the transform tree and needs to invalidate its parents or be invalidated. This includes classes that are not really transforms, such as bounding boxes, since some transforms depend on bounding boxes to compute their values.
Return whether x, y is in the bounding box, but not on its edge.
Return whether x is in the open (x0, x1) interval.
Return whether y is in the open (y0, y1) interval.
Return whether this bounding box overlaps with the other bounding box, not including the edges.
The (signed) height of the bounding box.
Return the intersection of bbox1 and bbox2 if they intersect, or None if they don't.
The pair of x coordinates that define the bounding box.
This is not guaranteed to be sorted from left to right.
The pair of y coordinates that define the bounding box.
This is not guaranteed to be sorted from bottom to top.
The top-right corner of the bounding box.
The bottom-left corner of the bounding box.
Return whether this bounding box overlaps with the other bounding box.
The first pair of (x, y) coordinates that define the bounding box.
This is not guaranteed to be the bottom-left corner (for that, use min).
The second pair of (x, y) coordinates that define the bounding box.
This is not guaranteed to be the top-right corner (for that, use max).
Construct a Bbox by padding this one on all four sides by p.
Return the axes-aligned bounding box that bounds the result of rotating this Bbox by an angle of radians.
Return a copy of the Bbox, shrunk by the factor mx in the x direction and the factor my in the y direction. The lower left corner of the box remains unchanged. Normally mx and my will be less than 1, but this is not enforced.
Return a copy of the Bbox, shrunk so that it is as large as it can be while having the desired aspect ratio, box_aspect. If the box coordinates are relative (i.e. fractions of a larger box such as a figure) then the physical aspect ratio of that figure is specified with fig_aspect, so that box_aspect can also be given as a ratio of the absolute dimensions, not the relative dimensions.
The (signed) width and height of the bounding box.
Return a list of new Bbox objects formed by splitting the original one with vertical lines at fractional positions given by args.
Return a list of new Bbox objects formed by splitting the original one with horizontal lines at fractional positions given by args.
Construct a Bbox by statically transforming this one by transform.
Construct a Bbox by translating this one by tx and ty.
Return a Bbox that contains all of the given bboxes.
The (signed) width of the bounding box.
The first of the pair of x coordinates that define the bounding box.
This is not guaranteed to be less than x1 (for that, use xmin).
The second of the pair of x coordinates that define the bounding box.
This is not guaranteed to be greater than x0 (for that, use xmax).
The right edge of the bounding box.
The left edge of the bounding box.
The first of the pair of y coordinates that define the bounding box.
This is not guaranteed to be less than y1 (for that, use ymin).
The second of the pair of y coordinates that define the bounding box.
This is not guaranteed to be greater than y0 (for that, use ymax).
The top edge of the bounding box.
The bottom edge of the bounding box.
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.
Create a new BboxTransform that linearly transforms points from boxin to boxout.
Return str(self).
Get the matrix for the affine part of this transform.
True if this transform is separable in the x- and y- dimensions.
Bases: matplotlib.transforms.Affine2DBase
BboxTransformFrom linearly transforms points from a given Bbox to the unit bounding box.
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.
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.
Return str(self).
Get the matrix for the affine part of this transform.
True if this transform is separable in the x- and y- dimensions.
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.
Create a new BboxTransformTo that linearly transforms points from the unit bounding box to boxout.
Return str(self).
Get the matrix for the affine part of this transform.
True if this transform is separable in the x- and y- dimensions.
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.
Get the matrix for the affine part of this transform.
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.
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.
Get the matrix for the affine part of this transform.
True if this transform is separable in the x- and y- dimensions.
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.
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.
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.
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.
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 the affine part of this transform.
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.
The number of input dimensions of this transform. Must be overridden (with integers) in the subclass.
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.
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.
True if this transform is separable in the x- and y- dimensions.
The number of output dimensions of this transform. Must be overridden (with integers) in the subclass.
If pass_through is True, all ancestors will always be invalidated, even if 'self' is already invalid.
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.
The input values as NumPy array of length input_dims or shape (N x input_dims).
The output values as NumPy array of length input_dims or shape (N x output_dims), depending on the input.
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.
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.
Return str(self).
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 the matrix for the affine part of this transform.
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.
Return self==value.
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.
Return str(self).
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.
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 the affine part of this transform.
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.
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.
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.
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.
If pass_through is True, all ancestors will always be invalidated, even if 'self' is already invalid.
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).
The input values as NumPy array of length input_dims or shape (N x input_dims).
The output values as NumPy array of length input_dims or shape (N x output_dims), depending on the input.
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.
The input values as NumPy array of length input_dims or shape (N x input_dims).
The output values as NumPy array of length input_dims or shape (N x output_dims), depending on the input.
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)).
Bases: matplotlib.transforms.Affine2DBase
A special class that does one thing, the identity transform, in a fast way.
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.
Return str(self).
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 the affine part of this transform.
Get the matrix for the affine part of this transform.
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.
Apply this transformation on the given array of values.
The input values as NumPy array of length input_dims or shape (N x input_dims).
The output values as NumPy array of length input_dims or shape (N x output_dims), depending on the input.
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).
The input values as NumPy array of length input_dims or shape (N x input_dims).
The output values as NumPy array of length input_dims or shape (N x output_dims), depending on the input.
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.
The input values as NumPy array of length input_dims or shape (N x input_dims).
The output values as NumPy array of length input_dims or shape (N x output_dims), depending on the input.
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.
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)).
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)).
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.
The child bounding box to wrap.
The locked value for x0, or None to leave unlocked.
The locked value for y0, or None to leave unlocked.
The locked value for x1, or None to leave unlocked.
The locked value for y1, or None to leave unlocked.
The child bounding box to wrap.
The locked value for x0, or None to leave unlocked.
The locked value for y0, or None to leave unlocked.
The locked value for x1, or None to leave unlocked.
The locked value for y1, or None to leave unlocked.
Return str(self).
float or None: The value used for the locked x0.
float or None: The value used for the locked x1.
float or None: The value used for the locked y0.
float or None: The value used for the locked y1.
Bases: matplotlib.transforms.Affine2DBase
A transformation that translates by xt and yt, after xt and yt have been transformed by scale_trans.
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.
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.
Return str(self).
Get the matrix for the affine part of this transform.
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):
The following attributes may be overridden if the default is unsuitable:
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:
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.
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 interface to get at this Transform's affine matrix.
This method is called when a class is subclassed.
The default implementation does nothing. It may be overridden to extend subclasses.
Compose self with the inverse of other, cancelling identical terms if any:
Cancellation (rather than naively returning A + B.inverted()) is important for multiple reasons:
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.
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.:
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 the affine part of this transform.
Get the matrix for the affine part of this transform.
True if this transform has a corresponding inverse transform.
The number of input dimensions of this transform. Must be overridden (with integers) in the subclass.
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.
True if this transform is separable in the x- and y- dimensions.
The number of output dimensions of this transform. Must be overridden (with integers) in the subclass.
Apply this transformation on the given array of values.
The input values as NumPy array of length input_dims or shape (N x input_dims).
The output values as NumPy array of length input_dims or shape (N x output_dims), depending on the input.
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).
The input values as NumPy array of length input_dims or shape (N x input_dims).
The output values as NumPy array of length input_dims or shape (N x output_dims), depending on the input.
Transform a set of angles anchored at specific locations.
The angles to transform.
The points where the angles are anchored.
Whether angles are radians or degrees.
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.
Transform the given bounding box.
For smarter transforms including caching (a common requirement in Matplotlib), see TransformedBbox.
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.
The input values as NumPy array of length input_dims or shape (N x input_dims).
The output values as NumPy array of length input_dims or shape (N x output_dims), depending on the input.
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.
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)).
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)).
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.
Bases: object
The base class for anything that participates in the transform tree and needs to invalidate its parents or be invalidated. This includes classes that are not really transforms, such as bounding boxes, since some transforms depend on bounding boxes to compute their values.
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.
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.
list of weak references to the object (if defined)
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.
Invalidate this TransformNode and triggers an invalidation of its ancestors. Should be called any time the transform changes.
If pass_through is True, all ancestors will always be invalidated, even if 'self' is already invalid.
Set the children of the transform, to let the invalidation system know which transforms can invalidate this transform. Should be called from the constructor of any transforms that depend on other transforms.
Bases: matplotlib.transforms.Transform
A helper class that holds a single child transform and acts equivalently to it.
This is useful if a node of the transform tree must be replaced at run time with a transform of a different type. This class allows that replacement to correctly trigger invalidation.
TransformWrapper instances must have the same input and output dimensions during their entire lifetime, so the child transform may only be replaced with another child transform of the same dimensions.
child: A Transform instance. This child may later be replaced with set().
Return self==value.
child: A Transform instance. This child may later be replaced with set().
Return str(self).
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.
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.
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.
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.
If pass_through is True, all ancestors will always be invalidated, even if 'self' is already invalid.
Replace the current child of this transform with another one.
The new child must have the same number of input and output dimensions as the current child.
Bases: matplotlib.transforms.BboxBase
A Bbox that is automatically transformed by a given transform. When either the child bounding box or transform changes, the bounds of this bbox will update accordingly.
Return str(self).
Bases: matplotlib.transforms.TransformedPath
A TransformedPatchPath caches a non-affine transformed copy of the Patch. This cached copy is automatically updated when the non-affine part of the transform or the patch changes.
Bases: matplotlib.transforms.TransformNode
A TransformedPath caches a non-affine transformed copy of the Path. This cached copy is automatically updated when the non-affine part of the transform changes.
Note
Paths are considered immutable by this class. Any update to the path's vertices/codes will not trigger a transform recomputation.
Return a fully-transformed copy of the child path.
Return a copy of the child path, with the non-affine part of the transform already applied, along with the affine part of the path necessary to complete the transformation.
Return a copy of the child path, with the non-affine part of the transform already applied, along with the affine part of the path necessary to complete the transformation. Unlike get_transformed_path_and_affine(), no interpolation will be performed.
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.
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.:
Check, inclusively, whether an interval includes a given value.
The endpoints of the interval.
Value to check is within interval.
Whether val is within the interval.
Check, excluding endpoints, whether an interval includes a given value.
The endpoints of the interval.
Value to check is within interval.
Whether val is within the interval.
Modify the endpoints of a range as needed to avoid singularities.
The initial endpoints.
Fractional amount by which vmin and vmax are expanded if the original interval is too small, based on tiny.
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.
If True, swap vmin, vmax if vmin > vmax.
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.
Return a new transform with an added offset.
Any transform, to which offset will be applied.
Current figure. It can be None if units are 'dots'.
The offset to apply.
Units of the offset.
Transform with applied offset.


Bases: matplotlib.transforms.Affine2DBase
A mutable 2D affine transformation.
Initialize an Affine transform from a 3x3 numpy float array:
If matrix is None, initialize with the identity transform.
Initialize an Affine transform from a 3x3 numpy float array:
If matrix is None, initialize with the identity transform.
Return str(self).
Reset the underlying matrix to the identity transform.
Create a new Affine2D instance from the given values:
.
Get the underlying transformation matrix as a 3x3 numpy array:
.
Return a new Affine2D object that is the identity transform.
Unless this transform will be mutated later on, consider using the faster IdentityTransform class instead.
Add a rotation (in radians) to this transform in place.
Returns self, so this method can easily be chained with more calls to rotate(), rotate_deg(), translate() and scale().
Add a rotation (in radians) around the point (x, y) in place.
Returns self, so this method can easily be chained with more calls to rotate(), rotate_deg(), translate() and scale().
Add a rotation (in degrees) to this transform in place.
Returns self, so this method can easily be chained with more calls to rotate(), rotate_deg(), translate() and scale().
Add a rotation (in degrees) around the point (x, y) in place.
Returns self, so this method can easily be chained with more calls to rotate(), rotate_deg(), translate() and scale().
Add a scale in place.
If sy is None, the same scale is applied in both the x- and y-directions.
Returns self, so this method can easily be chained with more calls to rotate(), rotate_deg(), translate() and scale().
Set this transformation from the frozen copy of another Affine2DBase object.
Set the underlying transformation matrix from a 3x3 numpy array:
.
Add a skew in place.
xShear and yShear are the shear angles along the x- and y-axes, respectively, in radians.
Returns self, so this method can easily be chained with more calls to rotate(), rotate_deg(), translate() and scale().
Add a skew in place.
xShear and yShear are the shear angles along the x- and y-axes, respectively, in degrees.
Returns self, so this method can easily be chained with more calls to rotate(), rotate_deg(), translate() and scale().
Add a translation in place.
Returns self, so this method can easily be chained with more calls to rotate(), rotate_deg(), translate() and scale().


Initialize an Affine transform from a 3x3 numpy float array:
If matrix is None, initialize with the identity transform.


Reset the underlying matrix to the identity transform.


Create a new Affine2D instance from the given values:
.


Get the underlying transformation matrix as a 3x3 numpy array:
.


Return a new Affine2D object that is the identity transform.
Unless this transform will be mutated later on, consider using the faster IdentityTransform class instead.


Add a rotation (in radians) to this transform in place.
Returns self, so this method can easily be chained with more calls to rotate(), rotate_deg(), translate() and scale().


Add a rotation (in radians) around the point (x, y) in place.
Returns self, so this method can easily be chained with more calls to rotate(), rotate_deg(), translate() and scale().


Add a rotation (in degrees) to this transform in place.
Returns self, so this method can easily be chained with more calls to rotate(), rotate_deg(), translate() and scale().


Add a rotation (in degrees) around the point (x, y) in place.
Returns self, so this method can easily be chained with more calls to rotate(), rotate_deg(), translate() and scale().


Add a scale in place.
If sy is None, the same scale is applied in both the x- and y-directions.
Returns self, so this method can easily be chained with more calls to rotate(), rotate_deg(), translate() and scale().


Set this transformation from the frozen copy of another Affine2DBase object.


Set the underlying transformation matrix from a 3x3 numpy array:
.


Add a skew in place.
xShear and yShear are the shear angles along the x- and y-axes, respectively, in radians.
Returns self, so this method can easily be chained with more calls to rotate(), rotate_deg(), translate() and scale().


Add a skew in place.
xShear and yShear are the shear angles along the x- and y-axes, respectively, in degrees.
Returns self, so this method can easily be chained with more calls to rotate(), rotate_deg(), translate() and scale().


Add a translation in place.
Returns self, so this method can easily be chained with more calls to rotate(), rotate_deg(), translate() and scale().


Bases: matplotlib.transforms.AffineBase
The base class of all 2D affine transformations.
2D affine transformations are performed using a 3x3 numpy array:
This class provides the read-only interface. For a mutable 2D affine transformation, use Affine2D.
Subclasses of this class will generally only need to override a constructor and get_matrix() that generates a custom 3x3 matrix.
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.
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.
True if this transform has a corresponding inverse transform.
The number of input dimensions of this transform. Must be overridden (with integers) in the subclass.
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.
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.
The number of output dimensions of this transform. Must be overridden (with integers) in the subclass.
Return the values of the matrix as an (a, b, c, d, e, f) tuple.
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).
The input values as NumPy array of length input_dims or shape (N x input_dims).
The output values as NumPy array of length input_dims or shape (N x output_dims), depending on the input.


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.


True if this transform has a corresponding inverse transform.


The number of input dimensions of this transform. Must be overridden (with integers) in the subclass.


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.


The number of output dimensions of this transform. Must be overridden (with integers) in the subclass.


Return the values of the matrix as an (a, b, c, d, e, f) tuple.


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).
The input values as NumPy array of length input_dims or shape (N x input_dims).
The output values as NumPy array of length input_dims or shape (N x output_dims), depending on the input.


Bases: matplotlib.transforms.Transform
The base class of all affine transformations of any number of dimensions.
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.
Array interface to get at this Transform's affine matrix.
Return self==value.
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.
Get the affine part of this transform.
Apply this transformation on the given array of values.
The input values as NumPy array of length input_dims or shape (N x input_dims).
The output values as NumPy array of length input_dims or shape (N x output_dims), depending on the input.
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).
The input values as NumPy array of length input_dims or shape (N x input_dims).
The output values as NumPy array of length input_dims or shape (N x output_dims), depending on the input.
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.
The input values as NumPy array of length input_dims or shape (N x input_dims).
The output values as NumPy array of length input_dims or shape (N x output_dims), depending on the input.
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.
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)).
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)).


Array interface to get at this Transform's affine matrix.


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.


Apply this transformation on the given array of values.
The input values as NumPy array of length input_dims or shape (N x input_dims).
The output values as NumPy array of length input_dims or shape (N x output_dims), depending on the input.


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.
The input values as NumPy array of length input_dims or shape (N x input_dims).
The output values as NumPy array of length input_dims or shape (N x output_dims), depending on the input.


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.


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)).


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)).


Bases: matplotlib.transforms.Affine2DBase
A transform wrapper for transforming displacements between pairs of points.
This class is intended to be used to transform displacements ("position deltas") between pairs of points (e.g., as the offset_transform of Collections): given a transform t such that t =
AffineDeltaTransform(t) + offset, AffineDeltaTransform satisfies AffineDeltaTransform(a - b) == AffineDeltaTransform(a) -
AffineDeltaTransform(b).
This is implemented by forcing the offset components of the transform matrix to zero.
This class is experimental as of 3.3, and the API may change.
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.
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.
Return str(self).
Get the matrix for the affine part of this transform.


Get the matrix for the affine part of this transform.


Bases: matplotlib.transforms.BboxBase
A mutable bounding box.
Create from known bounds
The default constructor takes the boundary "points" [[xmin, ymin],
[xmax, ymax]].
Alternatively, a Bbox can be created from the flattened points array, the so-called "extents" (xmin, ymin, xmax, ymax)
or from the "bounds" (xmin, ymin, width, height).
Create from collections of points
The "empty" object for accumulating Bboxs is the null bbox, which is a stand-in for the empty set.
Adding points to the null bbox will give you the bbox of those points.
Setting ignore=True is equivalent to starting over from a null bbox.
Warning
It is recommended to always specify ignore explicitly. If not, the default value of ignore can be changed at any time by code with access to your Bbox, for example using the method ignore.
Properties of the ``null`` bbox
Note
The current behavior of Bbox.null() may be surprising as it does not have all of the properties of the "empty set", and as such does not behave like a "zero" object in the mathematical sense. We may change that in the future (with a deprecation period).
The null bbox is the identity for intersections
except with itself, where it returns the full space.
A union containing null will always return the full space (not the other set!)
A 2x2 numpy array of the form [[x0, y0], [x1, y1]].
Default object formatter.
A 2x2 numpy array of the form [[x0, y0], [x1, y1]].
Return repr(self).
Return str(self).
Return (x0, y0, width, height).
Create a new Bbox from x0, y0, width and height.
width and height may be negative.
Create a new Bbox from left, bottom, right and top.
The y-axis increases upwards.
The four extents of the bounding box.
If this is supplied, the Bbox will have a minimum positive value set. This is useful when dealing with logarithmic scales and other scales where negative bounds result in floating point errors.
The base class for anything that participates in the transform tree and needs to invalidate its parents or be invalidated. This includes classes that are not really transforms, such as bounding boxes, since some transforms depend on bounding boxes to compute their values.
Get the points of the bounding box directly as a numpy array of the form: [[x0, y0], [x1, y1]].
Set whether the existing bounds of the box should be ignored by subsequent calls to update_from_data_xy().
The pair of x coordinates that define the bounding box.
This is not guaranteed to be sorted from left to right.
The pair of y coordinates that define the bounding box.
This is not guaranteed to be sorted from bottom to top.
The minimum positive value in both directions within the Bbox.
This is useful when dealing with logarithmic scales and other scales where negative bounds result in floating point errors, and will be used as the minimum extent instead of p0.
The minimum positive value in the x-direction within the Bbox.
This is useful when dealing with logarithmic scales and other scales where negative bounds result in floating point errors, and will be used as the minimum x-extent instead of x0.
The minimum positive value in the y-direction within the Bbox.
This is useful when dealing with logarithmic scales and other scales where negative bounds result in floating point errors, and will be used as the minimum y-extent instead of y0.
Return whether the bbox has changed since init.
Return whether the x-limits have changed since init.
Return whether the y-limits have changed since init.
Create a new null Bbox from (inf, inf) to (-inf, -inf).
The first pair of (x, y) coordinates that define the bounding box.
This is not guaranteed to be the bottom-left corner (for that, use min).
The second pair of (x, y) coordinates that define the bounding box.
This is not guaranteed to be the top-right corner (for that, use max).
Set this bounding box from the "frozen" bounds of another Bbox.
Set the points of the bounding box directly from a numpy array of the form: [[x0, y0], [x1, y1]]. No error checking is performed, as this method is mainly for internal use.
Create a new unit Bbox from (0, 0) to (1, 1).
Update the x-bounds of the Bbox based on the passed in data. After updating, the bounds will have positive width, and x0 will be the minimal value.
Array of x-values.
Update the bounds of the Bbox based on the passed in data. After updating, the bounds will have positive width and height; x0 and y0 will be the minimal values.
A numpy array of 2D points.
When True, update the x/y values.
Update the y-bounds of the Bbox based on the passed in data. After updating, the bounds will have positive height, and y0 will be the minimal value.
Array of y-values.
Update the bounds of the Bbox to contain the vertices of the provided path. After updating, the bounds will have positive width and height; x0 and y0 will be the minimal values.
When True, update the x/y values.
The first of the pair of x coordinates that define the bounding box.
This is not guaranteed to be less than x1 (for that, use xmin).
The second of the pair of x coordinates that define the bounding box.
This is not guaranteed to be greater than x0 (for that, use xmax).
The first of the pair of y coordinates that define the bounding box.
This is not guaranteed to be less than y1 (for that, use ymin).
The second of the pair of y coordinates that define the bounding box.
This is not guaranteed to be greater than y0 (for that, use ymax).


A 2x2 numpy array of the form [[x0, y0], [x1, y1]].


Create a new Bbox from x0, y0, width and height.
width and height may be negative.


Create a new Bbox from left, bottom, right and top.
The y-axis increases upwards.
The four extents of the bounding box.
If this is supplied, the Bbox will have a minimum positive value set. This is useful when dealing with logarithmic scales and other scales where negative bounds result in floating point errors.


The base class for anything that participates in the transform tree and needs to invalidate its parents or be invalidated. This includes classes that are not really transforms, such as bounding boxes, since some transforms depend on bounding boxes to compute their values.


Get the points of the bounding box directly as a numpy array of the form: [[x0, y0], [x1, y1]].


Set whether the existing bounds of the box should be ignored by subsequent calls to update_from_data_xy().


Return whether the bbox has changed since init.


Return whether the x-limits have changed since init.


Return whether the y-limits have changed since init.


Create a new null Bbox from (inf, inf) to (-inf, -inf).


Set this bounding box from the "frozen" bounds of another Bbox.


Set the points of the bounding box directly from a numpy array of the form: [[x0, y0], [x1, y1]]. No error checking is performed, as this method is mainly for internal use.


Create a new unit Bbox from (0, 0) to (1, 1).


Update the x-bounds of the Bbox based on the passed in data. After updating, the bounds will have positive width, and x0 will be the minimal value.
Array of x-values.


Update the bounds of the Bbox based on the passed in data. After updating, the bounds will have positive width and height; x0 and y0 will be the minimal values.
A numpy array of 2D points.
When True, update the x/y values.


Update the y-bounds of the Bbox based on the passed in data. After updating, the bounds will have positive height, and y0 will be the minimal value.
Array of y-values.


Update the bounds of the Bbox to contain the vertices of the provided path. After updating, the bounds will have positive width and height; x0 and y0 will be the minimal values.
When True, update the x/y values.


Bases: matplotlib.transforms.TransformNode
The base class of all bounding boxes.
This class is immutable; Bbox is a mutable subclass.
The canonical representation is as two points, with no restrictions on their ordering. Convenience properties are provided to get the left, bottom, right and top edges and width and height, but these are not stored explicitly.
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.
Return a copy of the Bbox anchored to c within container.
Either an (x, y) pair of relative coordinates (0 is left or bottom, 1 is right or top), 'C' (center), or a cardinal direction ('SW', southwest, is bottom left, etc.).
The box within which the Bbox is positioned; it defaults to the initial Bbox.
See also
Return (x0, y0, width, height).
Return whether (x, y) is in the bounding box or on its edge.
Return whether x is in the closed (x0, x1) interval.
Return whether y is in the closed (y0, y1) interval.
Return the corners of this rectangle as an array of points.
Specifically, this returns the array [[x0, y0], [x0, y1], [x1, y0], [x1, y1]].
Count the number of vertices contained in the Bbox. Any vertices with a non-finite x or y value are ignored.
Count the number of bounding boxes that overlap this one.
Construct a Bbox by expanding this one around its center by the factors sw and sh.
Return (x0, y0, x1, y1).
The base class for anything that participates in the transform tree and needs to invalidate its parents or be invalidated. This includes classes that are not really transforms, such as bounding boxes, since some transforms depend on bounding boxes to compute their values.
Return whether x, y is in the bounding box, but not on its edge.
Return whether x is in the open (x0, x1) interval.
Return whether y is in the open (y0, y1) interval.
Return whether this bounding box overlaps with the other bounding box, not including the edges.
The (signed) height of the bounding box.
Return the intersection of bbox1 and bbox2 if they intersect, or None if they don't.
The pair of x coordinates that define the bounding box.
This is not guaranteed to be sorted from left to right.
The pair of y coordinates that define the bounding box.
This is not guaranteed to be sorted from bottom to top.
The top-right corner of the bounding box.
The bottom-left corner of the bounding box.
Return whether this bounding box overlaps with the other bounding box.
The first pair of (x, y) coordinates that define the bounding box.
This is not guaranteed to be the bottom-left corner (for that, use min).
The second pair of (x, y) coordinates that define the bounding box.
This is not guaranteed to be the top-right corner (for that, use max).
Construct a Bbox by padding this one on all four sides by p.
Return the axes-aligned bounding box that bounds the result of rotating this Bbox by an angle of radians.
Return a copy of the Bbox, shrunk by the factor mx in the x direction and the factor my in the y direction. The lower left corner of the box remains unchanged. Normally mx and my will be less than 1, but this is not enforced.
Return a copy of the Bbox, shrunk so that it is as large as it can be while having the desired aspect ratio, box_aspect. If the box coordinates are relative (i.e. fractions of a larger box such as a figure) then the physical aspect ratio of that figure is specified with fig_aspect, so that box_aspect can also be given as a ratio of the absolute dimensions, not the relative dimensions.
The (signed) width and height of the bounding box.
Return a list of new Bbox objects formed by splitting the original one with vertical lines at fractional positions given by args.
Return a list of new Bbox objects formed by splitting the original one with horizontal lines at fractional positions given by args.
Construct a Bbox by statically transforming this one by transform.
Construct a Bbox by translating this one by tx and ty.
Return a Bbox that contains all of the given bboxes.
The (signed) width of the bounding box.
The first of the pair of x coordinates that define the bounding box.
This is not guaranteed to be less than x1 (for that, use xmin).
The second of the pair of x coordinates that define the bounding box.
This is not guaranteed to be greater than x0 (for that, use xmax).
The right edge of the bounding box.
The left edge of the bounding box.
The first of the pair of y coordinates that define the bounding box.
This is not guaranteed to be less than y1 (for that, use ymin).
The second of the pair of y coordinates that define the bounding box.
This is not guaranteed to be greater than y0 (for that, use ymax).
The top edge of the bounding box.
The bottom edge of the bounding box.


Return a copy of the Bbox anchored to c within container.
Either an (x, y) pair of relative coordinates (0 is left or bottom, 1 is right or top), 'C' (center), or a cardinal direction ('SW', southwest, is bottom left, etc.).
The box within which the Bbox is positioned; it defaults to the initial Bbox.
See also


Return whether (x, y) is in the bounding box or on its edge.


Return whether x is in the closed (x0, x1) interval.


Return whether y is in the closed (y0, y1) interval.


Return the corners of this rectangle as an array of points.
Specifically, this returns the array [[x0, y0], [x0, y1], [x1, y0], [x1, y1]].


Count the number of vertices contained in the Bbox. Any vertices with a non-finite x or y value are ignored.


Count the number of bounding boxes that overlap this one.


Construct a Bbox by expanding this one around its center by the factors sw and sh.


The base class for anything that participates in the transform tree and needs to invalidate its parents or be invalidated. This includes classes that are not really transforms, such as bounding boxes, since some transforms depend on bounding boxes to compute their values.


Return whether x, y is in the bounding box, but not on its edge.


Return whether x is in the open (x0, x1) interval.


Return whether y is in the open (y0, y1) interval.


Return whether this bounding box overlaps with the other bounding box, not including the edges.


Return the intersection of bbox1 and bbox2 if they intersect, or None if they don't.


Return whether this bounding box overlaps with the other bounding box.


Construct a Bbox by padding this one on all four sides by p.


Return the axes-aligned bounding box that bounds the result of rotating this Bbox by an angle of radians.


Return a copy of the Bbox, shrunk by the factor mx in the x direction and the factor my in the y direction. The lower left corner of the box remains unchanged. Normally mx and my will be less than 1, but this is not enforced.


Return a copy of the Bbox, shrunk so that it is as large as it can be while having the desired aspect ratio, box_aspect. If the box coordinates are relative (i.e. fractions of a larger box such as a figure) then the physical aspect ratio of that figure is specified with fig_aspect, so that box_aspect can also be given as a ratio of the absolute dimensions, not the relative dimensions.


Return a list of new Bbox objects formed by splitting the original one with vertical lines at fractional positions given by args.


Return a list of new Bbox objects formed by splitting the original one with horizontal lines at fractional positions given by args.


Construct a Bbox by statically transforming this one by transform.


Construct a Bbox by translating this one by tx and ty.


Return a Bbox that contains all of the given bboxes.


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.
Create a new BboxTransform that linearly transforms points from boxin to boxout.
Return str(self).
Get the matrix for the affine part of this transform.
True if this transform is separable in the x- and y- dimensions.


Create a new BboxTransform that linearly transforms points from boxin to boxout.


Get the matrix for the affine part of this transform.


True if this transform is separable in the x- and y- dimensions.


Bases: matplotlib.transforms.Affine2DBase
BboxTransformFrom linearly transforms points from a given Bbox to the unit bounding box.
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.
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.
Return str(self).
Get the matrix for the affine part of this transform.
True if this transform is separable in the x- and y- dimensions.


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.


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.
Create a new BboxTransformTo that linearly transforms points from the unit bounding box to boxout.
Return str(self).
Get the matrix for the affine part of this transform.
True if this transform is separable in the x- and y- dimensions.


Create a new BboxTransformTo that linearly transforms points from the unit bounding box to boxout.


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.
Get the matrix for the affine part of this transform.


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.


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.
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.
Get the matrix for the affine part of this transform.
True if this transform is separable in the x- and y- dimensions.


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.


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.
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.
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.
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.
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 the affine part of this transform.
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.
The number of input dimensions of this transform. Must be overridden (with integers) in the subclass.
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.
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.
True if this transform is separable in the x- and y- dimensions.
The number of output dimensions of this transform. Must be overridden (with integers) in the subclass.
If pass_through is True, all ancestors will always be invalidated, even if 'self' is already invalid.
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.
The input values as NumPy array of length input_dims or shape (N x input_dims).
The output values as NumPy array of length input_dims or shape (N x output_dims), depending on the input.


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.


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.


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.


The number of input dimensions of this transform. Must be overridden (with integers) in the subclass.


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.


The number of output dimensions of this transform. Must be overridden (with integers) in the subclass.


If pass_through is True, all ancestors will always be invalidated, even if 'self' is already invalid.


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.
The input values as NumPy array of length input_dims or shape (N x input_dims).
The output values as NumPy array of length input_dims or shape (N x output_dims), depending on the input.


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.:


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.
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.
Return str(self).
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 the matrix for the affine part of this transform.


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.


Get the matrix for the affine part of this transform.


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.
Return self==value.
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.
Return str(self).
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.
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 the affine part of this transform.
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.
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.
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.
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.
If pass_through is True, all ancestors will always be invalidated, even if 'self' is already invalid.
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).
The input values as NumPy array of length input_dims or shape (N x input_dims).
The output values as NumPy array of length input_dims or shape (N x output_dims), depending on the input.
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.
The input values as NumPy array of length input_dims or shape (N x input_dims).
The output values as NumPy array of length input_dims or shape (N x output_dims), depending on the input.
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)).


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.


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).
The input values as NumPy array of length input_dims or shape (N x input_dims).
The output values as NumPy array of length input_dims or shape (N x output_dims), depending on the input.


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)).