doc_content stringlengths 1 386k | doc_id stringlengths 5 188 |
|---|---|
matplotlib.tight_layout.get_renderer(fig)[source] | matplotlib.tight_layout_api#matplotlib.tight_layout.get_renderer |
matplotlib.tight_layout.get_subplotspec_list(axes_list, grid_spec=None)[source]
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. | matplotlib.tight_layout_api#matplotlib.tight_layout.get_subplotspec_list |
matplotlib.tight_layout.get_tight_layout_figure(fig, axes_list, subplotspec_list, renderer, pad=1.08, h_pad=None, w_pad=None, rect=None)[source]
Return subplot parameters for tight-layouted-figure with specified padding. Parameters
figFigure
axes_listlist of Axes
subplotspec_listlist of SubplotSpec
The subp... | matplotlib.tight_layout_api#matplotlib.tight_layout.get_tight_layout_figure |
matplotlib.transforms 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 content... | matplotlib.transformations |
classmatplotlib.transforms.Affine2D(matrix=None, **kwargs)[source]
Bases: matplotlib.transforms.Affine2DBase A mutable 2D affine transformation. Initialize an Affine transform from a 3x3 numpy float array: a c e
b d f
0 0 1
If matrix is None, initialize with the identity transform. __init__(matrix=None, **kwargs)[... | matplotlib.transformations#matplotlib.transforms.Affine2D |
__init__(matrix=None, **kwargs)[source]
Initialize an Affine transform from a 3x3 numpy float array: a c e
b d f
0 0 1
If matrix is None, initialize with the identity transform. | matplotlib.transformations#matplotlib.transforms.Affine2D.__init__ |
__module__='matplotlib.transforms' | matplotlib.transformations#matplotlib.transforms.Affine2D.__module__ |
__str__()[source]
Return str(self). | matplotlib.transformations#matplotlib.transforms.Affine2D.__str__ |
clear()[source]
Reset the underlying matrix to the identity transform. | matplotlib.transformations#matplotlib.transforms.Affine2D.clear |
staticfrom_values(a, b, c, d, e, f)[source]
Create a new Affine2D instance from the given values: a c e
b d f
0 0 1
. | matplotlib.transformations#matplotlib.transforms.Affine2D.from_values |
get_matrix()[source]
Get the underlying transformation matrix as a 3x3 numpy array: a c e
b d f
0 0 1
. | matplotlib.transformations#matplotlib.transforms.Affine2D.get_matrix |
staticidentity()[source]
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. | matplotlib.transformations#matplotlib.transforms.Affine2D.identity |
rotate(theta)[source]
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(). | matplotlib.transformations#matplotlib.transforms.Affine2D.rotate |
rotate_around(x, y, theta)[source]
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(). | matplotlib.transformations#matplotlib.transforms.Affine2D.rotate_around |
rotate_deg(degrees)[source]
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(). | matplotlib.transformations#matplotlib.transforms.Affine2D.rotate_deg |
rotate_deg_around(x, y, degrees)[source]
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(). | matplotlib.transformations#matplotlib.transforms.Affine2D.rotate_deg_around |
scale(sx, sy=None)[source]
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(). | matplotlib.transformations#matplotlib.transforms.Affine2D.scale |
set(other)[source]
Set this transformation from the frozen copy of another Affine2DBase object. | matplotlib.transformations#matplotlib.transforms.Affine2D.set |
set_matrix(mtx)[source]
Set the underlying transformation matrix from a 3x3 numpy array: a c e
b d f
0 0 1
. | matplotlib.transformations#matplotlib.transforms.Affine2D.set_matrix |
skew(xShear, yShear)[source]
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(). | matplotlib.transformations#matplotlib.transforms.Affine2D.skew |
skew_deg(xShear, yShear)[source]
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(). | matplotlib.transformations#matplotlib.transforms.Affine2D.skew_deg |
translate(tx, ty)[source]
Add a translation in place. Returns self, so this method can easily be chained with more calls to rotate(), rotate_deg(), translate() and scale(). | matplotlib.transformations#matplotlib.transforms.Affine2D.translate |
classmatplotlib.transforms.Affine2DBase(*args, **kwargs)[source]
Bases: matplotlib.transforms.AffineBase The base class of all 2D affine transformations. 2D affine transformations are performed using a 3x3 numpy array: a c e
b d f
0 0 1
This class provides the read-only interface. For a mutable 2D affine transformat... | matplotlib.transformations#matplotlib.transforms.Affine2DBase |
__module__='matplotlib.transforms' | matplotlib.transformations#matplotlib.transforms.Affine2DBase.__module__ |
frozen()[source]
Return a frozen copy of this transform node. The frozen copy will not be updated when its children change. Useful for storing a previously known state of a transform where copy.deepcopy() might normally be used. | matplotlib.transformations#matplotlib.transforms.Affine2DBase.frozen |
has_inverse=True
True if this transform has a corresponding inverse transform. | matplotlib.transformations#matplotlib.transforms.Affine2DBase.has_inverse |
input_dims=2
The number of input dimensions of this transform. Must be overridden (with integers) in the subclass. | matplotlib.transformations#matplotlib.transforms.Affine2DBase.input_dims |
inverted()[source]
Return the corresponding inverse transformation. It holds x == self.inverted().transform(self.transform(x)). The return value of this method should be treated as temporary. An update to self does not cause a corresponding update to its inverted copy. | matplotlib.transformations#matplotlib.transforms.Affine2DBase.inverted |
output_dims=2
The number of output dimensions of this transform. Must be overridden (with integers) in the subclass. | matplotlib.transformations#matplotlib.transforms.Affine2DBase.output_dims |
to_values()[source]
Return the values of the matrix as an (a, b, c, d, e, f) tuple. | matplotlib.transformations#matplotlib.transforms.Affine2DBase.to_values |
transform_affine(points)[source]
Apply only the affine part of this transformation on the given array of values. transform(values) is always equivalent to transform_affine(transform_non_affine(values)). In non-affine transformations, this is generally a no-op. In affine transformations, this is equivalent to transfor... | matplotlib.transformations#matplotlib.transforms.Affine2DBase.transform_affine |
classmatplotlib.transforms.AffineBase(*args, **kwargs)[source]
Bases: matplotlib.transforms.Transform The base class of all affine transformations of any number of dimensions. Parameters
shorthand_namestr
A string representing the "name" of the transform. The name carries no significance other than to improve t... | matplotlib.transformations#matplotlib.transforms.AffineBase |
__array__(*args, **kwargs)[source]
Array interface to get at this Transform's affine matrix. | matplotlib.transformations#matplotlib.transforms.AffineBase.__array__ |
__eq__(other)[source]
Return self==value. | matplotlib.transformations#matplotlib.transforms.AffineBase.__eq__ |
__hash__=None | matplotlib.transformations#matplotlib.transforms.AffineBase.__hash__ |
__init__(*args, **kwargs)[source]
Parameters
shorthand_namestr
A string representing the "name" of the transform. The name carries no significance other than to improve the readability of str(transform) when DEBUG=True. | matplotlib.transformations#matplotlib.transforms.AffineBase.__init__ |
__module__='matplotlib.transforms' | matplotlib.transformations#matplotlib.transforms.AffineBase.__module__ |
get_affine()[source]
Get the affine part of this transform. | matplotlib.transformations#matplotlib.transforms.AffineBase.get_affine |
is_affine=True | matplotlib.transformations#matplotlib.transforms.AffineBase.is_affine |
transform(values)[source]
Apply this transformation on the given array of values. Parameters
valuesarray
The input values as NumPy array of length input_dims or shape (N x input_dims). Returns
array
The output values as NumPy array of length input_dims or shape (N x output_dims), depending on the input. | matplotlib.transformations#matplotlib.transforms.AffineBase.transform |
transform_affine(values)[source]
Apply only the affine part of this transformation on the given array of values. transform(values) is always equivalent to transform_affine(transform_non_affine(values)). In non-affine transformations, this is generally a no-op. In affine transformations, this is equivalent to transfor... | matplotlib.transformations#matplotlib.transforms.AffineBase.transform_affine |
transform_non_affine(points)[source]
Apply only the non-affine part of this transformation. transform(values) is always equivalent to transform_affine(transform_non_affine(values)). In non-affine transformations, this is generally equivalent to transform(values). In affine transformations, this is always a no-op. Pa... | matplotlib.transformations#matplotlib.transforms.AffineBase.transform_non_affine |
transform_path(path)[source]
Apply the transform to Path path, returning a new Path. In some cases, this transform may insert curves into the path that began as line segments. | matplotlib.transformations#matplotlib.transforms.AffineBase.transform_path |
transform_path_affine(path)[source]
Apply the affine part of this transform to Path path, returning a new Path. transform_path(path) is equivalent to transform_path_affine(transform_path_non_affine(values)). | matplotlib.transformations#matplotlib.transforms.AffineBase.transform_path_affine |
transform_path_non_affine(path)[source]
Apply the non-affine part of this transform to Path path, returning a new Path. transform_path(path) is equivalent to transform_path_affine(transform_path_non_affine(values)). | matplotlib.transformations#matplotlib.transforms.AffineBase.transform_path_non_affine |
classmatplotlib.transforms.AffineDeltaTransform(transform, **kwargs)[source]
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 offs... | matplotlib.transformations#matplotlib.transforms.AffineDeltaTransform |
__init__(transform, **kwargs)[source]
Parameters
shorthand_namestr
A string representing the "name" of the transform. The name carries no significance other than to improve the readability of str(transform) when DEBUG=True. | matplotlib.transformations#matplotlib.transforms.AffineDeltaTransform.__init__ |
__module__='matplotlib.transforms' | matplotlib.transformations#matplotlib.transforms.AffineDeltaTransform.__module__ |
__str__()[source]
Return str(self). | matplotlib.transformations#matplotlib.transforms.AffineDeltaTransform.__str__ |
get_matrix()[source]
Get the matrix for the affine part of this transform. | matplotlib.transformations#matplotlib.transforms.AffineDeltaTransform.get_matrix |
classmatplotlib.transforms.Bbox(points, **kwargs)[source]
Bases: matplotlib.transforms.BboxBase A mutable bounding box. Examples Create from known bounds The default constructor takes the boundary "points" [[xmin, ymin],
[xmax, ymax]]. >>> Bbox([[1, 1], [3, 7]])
Bbox([[1.0, 1.0], [3.0, 7.0]])
Alternatively, a Bbox c... | matplotlib.transformations#matplotlib.transforms.Bbox |
__format__(fmt)[source]
Default object formatter. | matplotlib.transformations#matplotlib.transforms.Bbox.__format__ |
__init__(points, **kwargs)[source]
Parameters
pointsndarray
A 2x2 numpy array of the form [[x0, y0], [x1, y1]]. | matplotlib.transformations#matplotlib.transforms.Bbox.__init__ |
__module__='matplotlib.transforms' | matplotlib.transformations#matplotlib.transforms.Bbox.__module__ |
__repr__()[source]
Return repr(self). | matplotlib.transformations#matplotlib.transforms.Bbox.__repr__ |
__str__()[source]
Return str(self). | matplotlib.transformations#matplotlib.transforms.Bbox.__str__ |
staticfrom_bounds(x0, y0, width, height)[source]
Create a new Bbox from x0, y0, width and height. width and height may be negative. | matplotlib.transformations#matplotlib.transforms.Bbox.from_bounds |
staticfrom_extents(*args, minpos=None)[source]
Create a new Bbox from left, bottom, right and top. The y-axis increases upwards. Parameters
left, bottom, right, topfloat
The four extents of the bounding box.
minposfloat or None
If this is supplied, the Bbox will have a minimum positive value set. This is us... | matplotlib.transformations#matplotlib.transforms.Bbox.from_extents |
frozen()[source]
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. | matplotlib.transformations#matplotlib.transforms.Bbox.frozen |
get_points()[source]
Get the points of the bounding box directly as a numpy array of the form: [[x0, y0], [x1, y1]]. | matplotlib.transformations#matplotlib.transforms.Bbox.get_points |
ignore(value)[source]
Set whether the existing bounds of the box should be ignored by subsequent calls to update_from_data_xy(). valuebool
When True, subsequent calls to update_from_data_xy() will ignore the existing bounds of the Bbox. When False, subsequent calls to update_from_data_xy() will include the existi... | matplotlib.transformations#matplotlib.transforms.Bbox.ignore |
mutated()[source]
Return whether the bbox has changed since init. | matplotlib.transformations#matplotlib.transforms.Bbox.mutated |
mutatedx()[source]
Return whether the x-limits have changed since init. | matplotlib.transformations#matplotlib.transforms.Bbox.mutatedx |
mutatedy()[source]
Return whether the y-limits have changed since init. | matplotlib.transformations#matplotlib.transforms.Bbox.mutatedy |
staticnull()[source]
Create a new null Bbox from (inf, inf) to (-inf, -inf). | matplotlib.transformations#matplotlib.transforms.Bbox.null |
set(other)[source]
Set this bounding box from the "frozen" bounds of another Bbox. | matplotlib.transformations#matplotlib.transforms.Bbox.set |
set_points(points)[source]
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. | matplotlib.transformations#matplotlib.transforms.Bbox.set_points |
staticunit()[source]
Create a new unit Bbox from (0, 0) to (1, 1). | matplotlib.transformations#matplotlib.transforms.Bbox.unit |
update_from_data_x(x, ignore=None)[source]
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. Parameters
xndarray
Array of x-values.
ignorebool, optional
When True, ignore the existing bounds of the Bbox. When ... | matplotlib.transformations#matplotlib.transforms.Bbox.update_from_data_x |
update_from_data_xy(xy, ignore=None, updatex=True, updatey=True)[source]
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. Parameters
xyndarray
A numpy array of 2D points.
ignorebool, optional
Whe... | matplotlib.transformations#matplotlib.transforms.Bbox.update_from_data_xy |
update_from_data_y(y, ignore=None)[source]
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. Parameters
yndarray
Array of y-values.
ignorebool, optional
When True, ignore the existing bounds of the Bbox. When... | matplotlib.transformations#matplotlib.transforms.Bbox.update_from_data_y |
update_from_path(path, ignore=None, updatex=True, updatey=True)[source]
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. Parameters
pathPath
ignorebool, optional
when True, ignore ... | matplotlib.transformations#matplotlib.transforms.Bbox.update_from_path |
classmatplotlib.transforms.BboxBase(shorthand_name=None)[source]
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 provi... | matplotlib.transformations#matplotlib.transforms.BboxBase |
__array__(*args, **kwargs)[source] | matplotlib.transformations#matplotlib.transforms.BboxBase.__array__ |
__module__='matplotlib.transforms' | matplotlib.transformations#matplotlib.transforms.BboxBase.__module__ |
anchored(c, container=None)[source]
Return a copy of the Bbox anchored to c within container. Parameters
c(float, float) or {'C', 'SW', 'S', 'SE', 'E', 'NE', ...}
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 bo... | matplotlib.transformations#matplotlib.transforms.BboxBase.anchored |
coefs={'C': (0.5, 0.5), 'E': (1.0, 0.5), 'N': (0.5, 1.0), 'NE': (1.0, 1.0), 'NW': (0, 1.0), 'S': (0.5, 0), 'SE': (1.0, 0), 'SW': (0, 0), 'W': (0, 0.5)} | matplotlib.transformations#matplotlib.transforms.BboxBase.coefs |
contains(x, y)[source]
Return whether (x, y) is in the bounding box or on its edge. | matplotlib.transformations#matplotlib.transforms.BboxBase.contains |
containsx(x)[source]
Return whether x is in the closed (x0, x1) interval. | matplotlib.transformations#matplotlib.transforms.BboxBase.containsx |
containsy(y)[source]
Return whether y is in the closed (y0, y1) interval. | matplotlib.transformations#matplotlib.transforms.BboxBase.containsy |
corners()[source]
Return the corners of this rectangle as an array of points. Specifically, this returns the array [[x0, y0], [x0, y1], [x1, y0], [x1, y1]]. | matplotlib.transformations#matplotlib.transforms.BboxBase.corners |
count_contains(vertices)[source]
Count the number of vertices contained in the Bbox. Any vertices with a non-finite x or y value are ignored. Parameters
verticesNx2 Numpy array. | matplotlib.transformations#matplotlib.transforms.BboxBase.count_contains |
count_overlaps(bboxes)[source]
Count the number of bounding boxes that overlap this one. Parameters
bboxessequence of BboxBase | matplotlib.transformations#matplotlib.transforms.BboxBase.count_overlaps |
expanded(sw, sh)[source]
Construct a Bbox by expanding this one around its center by the factors sw and sh. | matplotlib.transformations#matplotlib.transforms.BboxBase.expanded |
frozen()[source]
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. | matplotlib.transformations#matplotlib.transforms.BboxBase.frozen |
fully_contains(x, y)[source]
Return whether x, y is in the bounding box, but not on its edge. | matplotlib.transformations#matplotlib.transforms.BboxBase.fully_contains |
fully_containsx(x)[source]
Return whether x is in the open (x0, x1) interval. | matplotlib.transformations#matplotlib.transforms.BboxBase.fully_containsx |
fully_containsy(y)[source]
Return whether y is in the open (y0, y1) interval. | matplotlib.transformations#matplotlib.transforms.BboxBase.fully_containsy |
fully_overlaps(other)[source]
Return whether this bounding box overlaps with the other bounding box, not including the edges. Parameters
otherBboxBase | matplotlib.transformations#matplotlib.transforms.BboxBase.fully_overlaps |
get_points()[source] | matplotlib.transformations#matplotlib.transforms.BboxBase.get_points |
staticintersection(bbox1, bbox2)[source]
Return the intersection of bbox1 and bbox2 if they intersect, or None if they don't. | matplotlib.transformations#matplotlib.transforms.BboxBase.intersection |
is_affine=True | matplotlib.transformations#matplotlib.transforms.BboxBase.is_affine |
is_bbox=True | matplotlib.transformations#matplotlib.transforms.BboxBase.is_bbox |
overlaps(other)[source]
Return whether this bounding box overlaps with the other bounding box. Parameters
otherBboxBase | matplotlib.transformations#matplotlib.transforms.BboxBase.overlaps |
padded(p)[source]
Construct a Bbox by padding this one on all four sides by p. | matplotlib.transformations#matplotlib.transforms.BboxBase.padded |
rotated(radians)[source]
Return the axes-aligned bounding box that bounds the result of rotating this Bbox by an angle of radians. | matplotlib.transformations#matplotlib.transforms.BboxBase.rotated |
shrunk(mx, my)[source]
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. | matplotlib.transformations#matplotlib.transforms.BboxBase.shrunk |
shrunk_to_aspect(box_aspect, container=None, fig_aspect=1.0)[source]
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 fig... | matplotlib.transformations#matplotlib.transforms.BboxBase.shrunk_to_aspect |
splitx(*args)[source]
Return a list of new Bbox objects formed by splitting the original one with vertical lines at fractional positions given by args. | matplotlib.transformations#matplotlib.transforms.BboxBase.splitx |
splity(*args)[source]
Return a list of new Bbox objects formed by splitting the original one with horizontal lines at fractional positions given by args. | matplotlib.transformations#matplotlib.transforms.BboxBase.splity |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.