doc_content
stringlengths
1
386k
doc_id
stringlengths
5
188
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.Transform.inverted
is_separable=False True if this transform is separable in the x- and y- dimensions.
matplotlib.transformations#matplotlib.transforms.Transform.is_separable
output_dims=None The number of output dimensions of this transform. Must be overridden (with integers) in the subclass.
matplotlib.transformations#matplotlib.transforms.Transform.output_dims
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.Transform.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.Transform.transform_affine
transform_angles(angles, pts, radians=False, pushoff=1e-05)[source] Transform a set of angles anchored at specific locations. Parameters angles(N,) array-like The angles to transform. pts(N, 2) array-like The points where the angles are anchored. radiansbool, default: False Whether angles are radians or...
matplotlib.transformations#matplotlib.transforms.Transform.transform_angles
transform_bbox(bbox)[source] Transform the given bounding box. For smarter transforms including caching (a common requirement in Matplotlib), see TransformedBbox.
matplotlib.transformations#matplotlib.transforms.Transform.transform_bbox
transform_non_affine(values)[source] Apply only the non-affine part of this transformation. transform(values) is always equivalent to transform_affine(transform_non_affine(values)). In non-affine transformations, this is generally equivalent to transform(values). In affine transformations, this is always a no-op. Pa...
matplotlib.transformations#matplotlib.transforms.Transform.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.Transform.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.Transform.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.Transform.transform_path_non_affine
transform_point(point)[source] Return a transformed point. This function is only kept for backcompatibility; the more general transform method is capable of transforming both a list of points and a single point. The point is given as a sequence of length input_dims. The transformed point is returned as a sequence of ...
matplotlib.transformations#matplotlib.transforms.Transform.transform_point
classmatplotlib.transforms.TransformedBbox(bbox, transform, **kwargs)[source] 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. Parameters bboxBbox transfo...
matplotlib.transformations#matplotlib.transforms.TransformedBbox
__init__(bbox, transform, **kwargs)[source] Parameters bboxBbox transformTransform
matplotlib.transformations#matplotlib.transforms.TransformedBbox.__init__
__module__='matplotlib.transforms'
matplotlib.transformations#matplotlib.transforms.TransformedBbox.__module__
__str__()[source] Return str(self).
matplotlib.transformations#matplotlib.transforms.TransformedBbox.__str__
get_points()[source]
matplotlib.transformations#matplotlib.transforms.TransformedBbox.get_points
classmatplotlib.transforms.TransformedPatchPath(patch)[source] 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. Parameters patchPatch ...
matplotlib.transformations#matplotlib.transforms.TransformedPatchPath
__init__(patch)[source] Parameters patchPatch
matplotlib.transformations#matplotlib.transforms.TransformedPatchPath.__init__
__module__='matplotlib.transforms'
matplotlib.transformations#matplotlib.transforms.TransformedPatchPath.__module__
classmatplotlib.transforms.TransformedPath(path, transform)[source] 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 c...
matplotlib.transformations#matplotlib.transforms.TransformedPath
__init__(path, transform)[source] Parameters pathPath transformTransform
matplotlib.transformations#matplotlib.transforms.TransformedPath.__init__
__module__='matplotlib.transforms'
matplotlib.transformations#matplotlib.transforms.TransformedPath.__module__
get_affine()[source]
matplotlib.transformations#matplotlib.transforms.TransformedPath.get_affine
get_fully_transformed_path()[source] Return a fully-transformed copy of the child path.
matplotlib.transformations#matplotlib.transforms.TransformedPath.get_fully_transformed_path
get_transformed_path_and_affine()[source] 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.
matplotlib.transformations#matplotlib.transforms.TransformedPath.get_transformed_path_and_affine
get_transformed_points_and_affine()[source] 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.
matplotlib.transformations#matplotlib.transforms.TransformedPath.get_transformed_points_and_affine
classmatplotlib.transforms.TransformNode(shorthand_name=None)[source] 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 b...
matplotlib.transformations#matplotlib.transforms.TransformNode
__copy__()[source]
matplotlib.transformations#matplotlib.transforms.TransformNode.__copy__
__deepcopy__(memo)[source]
matplotlib.transformations#matplotlib.transforms.TransformNode.__deepcopy__
__dict__=mappingproxy({'__module__': 'matplotlib.transforms', '__doc__': '\n The base class for anything that participates in the transform tree\n and needs to invalidate its parents or be invalidated. This includes\n classes that are not really transforms, such as bounding boxes, since some\n transforms depend on boun...
matplotlib.transformations#matplotlib.transforms.TransformNode.__dict__
__getstate__()[source]
matplotlib.transformations#matplotlib.transforms.TransformNode.__getstate__
__init__(shorthand_name=None)[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.TransformNode.__init__
__module__='matplotlib.transforms'
matplotlib.transformations#matplotlib.transforms.TransformNode.__module__
__setstate__(data_dict)[source]
matplotlib.transformations#matplotlib.transforms.TransformNode.__setstate__
__weakref__ list of weak references to the object (if defined)
matplotlib.transformations#matplotlib.transforms.TransformNode.__weakref__
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.TransformNode.frozen
INVALID=3
matplotlib.transformations#matplotlib.transforms.TransformNode.INVALID
INVALID_AFFINE=2
matplotlib.transformations#matplotlib.transforms.TransformNode.INVALID_AFFINE
INVALID_NON_AFFINE=1
matplotlib.transformations#matplotlib.transforms.TransformNode.INVALID_NON_AFFINE
invalidate()[source] Invalidate this TransformNode and triggers an invalidation of its ancestors. Should be called any time the transform changes.
matplotlib.transformations#matplotlib.transforms.TransformNode.invalidate
is_affine=False
matplotlib.transformations#matplotlib.transforms.TransformNode.is_affine
is_bbox=False
matplotlib.transformations#matplotlib.transforms.TransformNode.is_bbox
pass_through=False If pass_through is True, all ancestors will always be invalidated, even if 'self' is already invalid.
matplotlib.transformations#matplotlib.transforms.TransformNode.pass_through
set_children(*children)[source] 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.
matplotlib.transformations#matplotlib.transforms.TransformNode.set_children
classmatplotlib.transforms.TransformWrapper(child)[source] 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 rep...
matplotlib.transformations#matplotlib.transforms.TransformWrapper
__eq__(other)[source] Return self==value.
matplotlib.transformations#matplotlib.transforms.TransformWrapper.__eq__
__hash__=None
matplotlib.transformations#matplotlib.transforms.TransformWrapper.__hash__
__init__(child)[source] child: A Transform instance. This child may later be replaced with set().
matplotlib.transformations#matplotlib.transforms.TransformWrapper.__init__
__module__='matplotlib.transforms'
matplotlib.transformations#matplotlib.transforms.TransformWrapper.__module__
__str__()[source] Return str(self).
matplotlib.transformations#matplotlib.transforms.TransformWrapper.__str__
frozen()[source] Return a frozen copy of this transform node. The frozen copy will not be updated when its children change. Useful for storing a previously known state of a transform where copy.deepcopy() might normally be used.
matplotlib.transformations#matplotlib.transforms.TransformWrapper.frozen
pass_through=True If pass_through is True, all ancestors will always be invalidated, even if 'self' is already invalid.
matplotlib.transformations#matplotlib.transforms.TransformWrapper.pass_through
set(child)[source] 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.
matplotlib.transformations#matplotlib.transforms.TransformWrapper.set
matplotlib.tri Unstructured triangular grid functions. classmatplotlib.tri.Triangulation(x, y, triangles=None, mask=None)[source] An unstructured triangular grid consisting of npoints points and ntri triangles. The triangles can either be specified by the user or automatically generated using a Delaunay triangulati...
matplotlib.tri_api
classmatplotlib.tri.CubicTriInterpolator(triangulation, z, kind='min_E', trifinder=None, dz=None)[source] Bases: matplotlib.tri.triinterpolate.TriInterpolator Cubic interpolator on a triangular grid. In one-dimension - on a segment - a cubic interpolating function is defined by the values of the function and its deri...
matplotlib.tri_api#matplotlib.tri.CubicTriInterpolator
gradient(x, y)[source] Returns a list of 2 masked arrays containing interpolated derivatives at the specified (x, y) points. Parameters x, yarray-like x and y coordinates of the same shape and any number of dimensions. Returns dzdx, dzdynp.ma.array 2 masked arrays of the same shape as x and y; values co...
matplotlib.tri_api#matplotlib.tri.CubicTriInterpolator.gradient
classmatplotlib.tri.LinearTriInterpolator(triangulation, z, trifinder=None)[source] Bases: matplotlib.tri.triinterpolate.TriInterpolator Linear interpolator on a triangular grid. Each triangle is represented by a plane so that an interpolated value at point (x, y) lies on the plane of the triangle containing (x, y). ...
matplotlib.tri_api#matplotlib.tri.LinearTriInterpolator
gradient(x, y)[source] Returns a list of 2 masked arrays containing interpolated derivatives at the specified (x, y) points. Parameters x, yarray-like x and y coordinates of the same shape and any number of dimensions. Returns dzdx, dzdynp.ma.array 2 masked arrays of the same shape as x and y; values co...
matplotlib.tri_api#matplotlib.tri.LinearTriInterpolator.gradient
classmatplotlib.tri.TrapezoidMapTriFinder(triangulation)[source] Bases: matplotlib.tri.trifinder.TriFinder TriFinder class implemented using the trapezoid map algorithm from the book "Computational Geometry, Algorithms and Applications", second edition, by M. de Berg, M. van Kreveld, M. Overmars and O. Schwarzkopf. T...
matplotlib.tri_api#matplotlib.tri.TrapezoidMapTriFinder
classmatplotlib.tri.TriAnalyzer(triangulation)[source] Define basic tools for triangular mesh analysis and improvement. A TriAnalyzer encapsulates a Triangulation object and provides basic tools for mesh analysis and mesh improvement. Parameters triangulationTriangulation The encapsulated triangulation to analy...
matplotlib.tri_api#matplotlib.tri.TriAnalyzer
circle_ratios(rescale=True)[source] Return a measure of the triangulation triangles flatness. The ratio of the incircle radius over the circumcircle radius is a widely used indicator of a triangle flatness. It is always <= 0.5 and == 0.5 only for equilateral triangles. Circle ratios below 0.01 denote very flat triang...
matplotlib.tri_api#matplotlib.tri.TriAnalyzer.circle_ratios
get_flat_tri_mask(min_circle_ratio=0.01, rescale=True)[source] Eliminate excessively flat border triangles from the triangulation. Returns a mask new_mask which allows to clean the encapsulated triangulation from its border-located flat triangles (according to their circle_ratios()). This mask is meant to be subseque...
matplotlib.tri_api#matplotlib.tri.TriAnalyzer.get_flat_tri_mask
classmatplotlib.tri.Triangulation(x, y, triangles=None, mask=None)[source] An unstructured triangular grid consisting of npoints points and ntri triangles. The triangles can either be specified by the user or automatically generated using a Delaunay triangulation. Parameters x, y(npoints,) array-like Coordinate...
matplotlib.tri_api#matplotlib.tri.Triangulation
calculate_plane_coefficients(z)[source] Calculate plane equation coefficients for all unmasked triangles from the point (x, y) coordinates and specified z-array of shape (npoints). The returned array has shape (npoints, 3) and allows z-value at (x, y) position in triangle tri to be calculated using z = array[tri, 0] ...
matplotlib.tri_api#matplotlib.tri.Triangulation.calculate_plane_coefficients
get_cpp_triangulation()[source] Return the underlying C++ Triangulation object, creating it if necessary.
matplotlib.tri_api#matplotlib.tri.Triangulation.get_cpp_triangulation
staticget_from_args_and_kwargs(*args, **kwargs)[source] Return a Triangulation object from the args and kwargs, and the remaining args and kwargs with the consumed values removed. There are two alternatives: either the first argument is a Triangulation object, in which case it is returned, or the args and kwargs are ...
matplotlib.tri_api#matplotlib.tri.Triangulation.get_from_args_and_kwargs
get_masked_triangles()[source] Return an array of triangles that are not masked.
matplotlib.tri_api#matplotlib.tri.Triangulation.get_masked_triangles
get_trifinder()[source] Return the default matplotlib.tri.TriFinder of this triangulation, creating it if necessary. This allows the same TriFinder object to be easily shared.
matplotlib.tri_api#matplotlib.tri.Triangulation.get_trifinder
set_mask(mask)[source] Set or clear the mask array. Parameters maskNone or bool array of length ntri
matplotlib.tri_api#matplotlib.tri.Triangulation.set_mask
classmatplotlib.tri.TriContourSet(ax, *args, **kwargs)[source] Bases: matplotlib.contour.ContourSet Create and store a set of contour lines or filled regions for a triangular grid. This class is typically not instantiated directly by the user but by tricontour and tricontourf. Attributes axAxes The Axes object ...
matplotlib.tri_api#matplotlib.tri.TriContourSet
classmatplotlib.tri.TriFinder(triangulation)[source] Abstract base class for classes used to find the triangles of a Triangulation in which (x, y) points lie. Rather than instantiate an object of a class derived from TriFinder, it is usually better to use the function Triangulation.get_trifinder. Derived classes impl...
matplotlib.tri_api#matplotlib.tri.TriFinder
classmatplotlib.tri.TriInterpolator(triangulation, z, trifinder=None)[source] Abstract base class for classes used to interpolate on a triangular grid. Derived classes implement the following methods: __call__(x, y), where x, y are array-like point coordinates of the same shape, and that returns a masked array of t...
matplotlib.tri_api#matplotlib.tri.TriInterpolator
classmatplotlib.tri.TriRefiner(triangulation)[source] Abstract base class for classes implementing mesh refinement. A TriRefiner encapsulates a Triangulation object and provides tools for mesh refinement and interpolation. Derived classes must implement: refine_triangulation(return_tri_index=False, **kwargs) , wher...
matplotlib.tri_api#matplotlib.tri.TriRefiner
classmatplotlib.tri.UniformTriRefiner(triangulation)[source] Bases: matplotlib.tri.trirefine.TriRefiner Uniform mesh refinement by recursive subdivisions. Parameters triangulationTriangulation The encapsulated triangulation (to be refined) refine_field(z, triinterpolator=None, subdiv=3)[source] Refine a...
matplotlib.tri_api#matplotlib.tri.UniformTriRefiner
refine_field(z, triinterpolator=None, subdiv=3)[source] Refine a field defined on the encapsulated triangulation. Parameters z(npoints,) array-like Values of the field to refine, defined at the nodes of the encapsulated triangulation. (n_points is the number of points in the initial triangulation) triinterpol...
matplotlib.tri_api#matplotlib.tri.UniformTriRefiner.refine_field
refine_triangulation(return_tri_index=False, subdiv=3)[source] Compute an uniformly refined triangulation refi_triangulation of the encapsulated triangulation. This function refines the encapsulated triangulation by splitting each father triangle into 4 child sub-triangles built on the edges midside nodes, recursing ...
matplotlib.tri_api#matplotlib.tri.UniformTriRefiner.refine_triangulation
matplotlib.type1font A class representing a Type 1 font. This version reads pfa and pfb files and splits them for embedding in pdf files. It also supports SlantFont and ExtendFont transformations, similarly to pdfTeX and friends. There is no support yet for subsetting. Usage: >>> font = Type1Font(filename) >>> clear_pa...
matplotlib.type1font
classmatplotlib.type1font.Type1Font(input)[source] Bases: object A class representing a Type-1 font, for use by backends. Attributes partstuple A 3-tuple of the cleartext part, the encrypted part, and the finale of zeros. decryptedbytes The decrypted form of parts[1]. propdict[str, Any] A dictionary of ...
matplotlib.type1font#matplotlib.type1font.Type1Font
decrypted
matplotlib.type1font#matplotlib.type1font.Type1Font.decrypted
parts
matplotlib.type1font#matplotlib.type1font.Type1Font.parts
prop
matplotlib.type1font#matplotlib.type1font.Type1Font.prop
transform(effects)[source] Return a new font that is slanted and/or extended. Parameters effectsdict A dict with optional entries: 'slant'float, default: 0 Tangent of the angle that the font is to be slanted to the right. Negative values slant to the left. 'extend'float, default: 1 Scaling factor fo...
matplotlib.type1font#matplotlib.type1font.Type1Font.transform
matplotlib.units The classes here provide support for using custom classes with Matplotlib, e.g., those that do not expose the array interface but know how to convert themselves to arrays. It also supports classes with units and units conversion. Use cases include converters for custom objects, e.g., a list of datetime...
matplotlib.units_api
classmatplotlib.units.AxisInfo(majloc=None, minloc=None, majfmt=None, minfmt=None, label=None, default_limits=None)[source] Bases: object Information to support default axis labeling, tick labeling, and limits. An instance of this class must be returned by ConversionInterface.axisinfo. Parameters majloc, minlocLo...
matplotlib.units_api#matplotlib.units.AxisInfo
exceptionmatplotlib.units.ConversionError[source] Bases: TypeError
matplotlib.units_api#matplotlib.units.ConversionError
classmatplotlib.units.ConversionInterface[source] Bases: object The minimal interface for a converter to take custom data types (or sequences) and convert them to values Matplotlib can use. staticaxisinfo(unit, axis)[source] Return an AxisInfo for the axis with the specified units. staticconvert(obj, unit, ax...
matplotlib.units_api#matplotlib.units.ConversionInterface
staticaxisinfo(unit, axis)[source] Return an AxisInfo for the axis with the specified units.
matplotlib.units_api#matplotlib.units.ConversionInterface.axisinfo
staticconvert(obj, unit, axis)[source] Convert obj using unit for the specified axis. If obj is a sequence, return the converted sequence. The output must be a sequence of scalars that can be used by the numpy array layer.
matplotlib.units_api#matplotlib.units.ConversionInterface.convert
staticdefault_units(x, axis)[source] Return the default unit for x or None for the given axis.
matplotlib.units_api#matplotlib.units.ConversionInterface.default_units
staticis_numlike(x)[source] [Deprecated] The Matplotlib datalim, autoscaling, locators etc work with scalars which are the units converted to floats given the current unit. The converter may be passed these floats, or arrays of them, even when units are set. Notes Deprecated since version 3.5.
matplotlib.units_api#matplotlib.units.ConversionInterface.is_numlike
classmatplotlib.units.DecimalConverter[source] Bases: matplotlib.units.ConversionInterface Converter for decimal.Decimal data to float. staticconvert(value, unit, axis)[source] Convert Decimals to floats. The unit and axis arguments are not used. Parameters valuedecimal.Decimal or iterable Decimal or list o...
matplotlib.units_api#matplotlib.units.DecimalConverter
staticconvert(value, unit, axis)[source] Convert Decimals to floats. The unit and axis arguments are not used. Parameters valuedecimal.Decimal or iterable Decimal or list of Decimal need to be converted
matplotlib.units_api#matplotlib.units.DecimalConverter.convert
classmatplotlib.units.Registry[source] Bases: dict Register types with conversion interface. get_converter(x)[source] Get the converter interface instance for x, or None.
matplotlib.units_api#matplotlib.units.Registry
get_converter(x)[source] Get the converter interface instance for x, or None.
matplotlib.units_api#matplotlib.units.Registry.get_converter
matplotlib.use(backend, *, force=True)[source] Select the backend used for rendering and GUI integration. Parameters backendstr The backend to switch to. This can either be one of the standard backend names, which are case-insensitive: interactive backends: GTK3Agg, GTK3Cairo, GTK4Agg, GTK4Cairo, MacOSX, nbAgg...
matplotlib_configuration_api#matplotlib.use
matplotlib.widgets GUI neutral widgets Widgets that are designed to work for any of the GUI backends. All of these widgets require you to predefine a matplotlib.axes.Axes instance and pass that as the first parameter. Matplotlib doesn't try to be too smart with respect to layout -- you will have...
matplotlib.widgets_api
classmatplotlib.widgets.AxesWidget(ax)[source] Bases: matplotlib.widgets.Widget Widget connected to a single Axes. To guarantee that the widget remains responsive and not garbage-collected, a reference to the object should be maintained by the user. This is necessary because the callback registry maintains only weak-...
matplotlib.widgets_api#matplotlib.widgets.AxesWidget
connect_event(event, callback)[source] Connect a callback function with an event. This should be used in lieu of figure.canvas.mpl_connect since this function stores callback ids for later clean up.
matplotlib.widgets_api#matplotlib.widgets.AxesWidget.connect_event
disconnect_events()[source] Disconnect all events created by this widget.
matplotlib.widgets_api#matplotlib.widgets.AxesWidget.disconnect_events