doc_content stringlengths 1 386k | doc_id stringlengths 5 188 |
|---|---|
mpl_toolkits.axes_grid1.axes_grid.ImageGrid classmpl_toolkits.axes_grid1.axes_grid.ImageGrid(fig, rect, nrows_ncols, ngrids=None, direction='row', axes_pad=0.02, *, share_all=False, aspect=True, label_mode='L', cbar_mode=None, cbar_location='right', cbar_pad=None, cbar_size='5%', cbar_set_cax=True, axes_class=None)[source]
Bases: mpl_toolkits.axes_grid1.axes_grid.Grid Parameters
figFigure
The parent figure.
rect(float, float, float, float) or int
The axes position, as a (left, bottom, width, height) tuple or as a three-digit subplot position code (e.g., "121").
nrows_ncols(int, int)
Number of rows and columns in the grid.
ngridsint or None, default: None
If not None, only the first ngrids axes in the grid are created.
direction{"row", "column"}, default: "row"
Whether axes are created in row-major ("row by row") or column-major order ("column by column"). This also affects the order in which axes are accessed using indexing (grid[index]).
axes_padfloat or (float, float), default: 0.02in
Padding or (horizontal padding, vertical padding) between axes, in inches.
share_allbool, default: False
Whether all axes share their x- and y-axis.
aspectbool, default: True
Whether the axes aspect ratio follows the aspect ratio of the data limits.
label_mode{"L", "1", "all"}, default: "L"
Determines which axes will get tick labels: "L": All axes on the left column get vertical tick labels; all axes on the bottom row get horizontal tick labels. "1": Only the bottom left axes is labelled. "all": all axes are labelled.
cbar_mode{"each", "single", "edge", None}, default: None
Whether to create a colorbar for "each" axes, a "single" colorbar for the entire grid, colorbars only for axes on the "edge" determined by cbar_location, or no colorbars. The colorbars are stored in the cbar_axes attribute.
cbar_location{"left", "right", "bottom", "top"}, default: "right"
cbar_padfloat, default: None
Padding between the image axes and the colorbar axes.
cbar_sizesize specification (see Size.from_any), default: "5%"
Colorbar size.
cbar_set_caxbool, default: True
If True, each axes in the grid has a cax attribute that is bound to associated cbar_axes.
axes_classsubclass of matplotlib.axes.Axes, default: None | matplotlib._as_gen.mpl_toolkits.axes_grid1.axes_grid.imagegrid |
mpl_toolkits.axes_grid1.axes_rgb Classes
RGBAxes(*args[, pad]) 4-panel imshow (RGB, R, G, B). Functions
make_rgb_axes(ax[, pad, axes_class])
Parameters | matplotlib._as_gen.mpl_toolkits.axes_grid1.axes_rgb |
mpl_toolkits.axes_grid1.axes_rgb.make_rgb_axes mpl_toolkits.axes_grid1.axes_rgb.make_rgb_axes(ax, pad=0.01, axes_class=None, **kwargs)[source]
Parameters
padfloat
Fraction of the axes height.
Examples using mpl_toolkits.axes_grid1.axes_rgb.make_rgb_axes
Showing RGB channels using RGBAxes | matplotlib._as_gen.mpl_toolkits.axes_grid1.axes_rgb.make_rgb_axes |
mpl_toolkits.axes_grid1.axes_rgb.RGBAxes classmpl_toolkits.axes_grid1.axes_rgb.RGBAxes(*args, pad=0, **kwargs)[source]
Bases: object 4-panel imshow (RGB, R, G, B). Layout:
RGB R
G
B Subclasses can override the _defaultAxesClass attribute. Attributes
RGB_defaultAxesClass
The axes object for the three-channel imshow.
R_defaultAxesClass
The axes object for the red channel imshow.
G_defaultAxesClass
The axes object for the green channel imshow.
B_defaultAxesClass
The axes object for the blue channel imshow. Parameters
padfloat, default: 0
fraction of the axes height to put as padding.
axes_classmatplotlib.axes.Axes
*args
Unpacked into axes_class() init for RGB **kwargs
Unpacked into axes_class() init for RGB, R, G, B axes imshow_rgb(r, g, b, **kwargs)[source]
Create the four images {rgb, r, g, b}. Parameters
r, g, barray-like
The red, green, and blue arrays.
kwargsimshow kwargs
kwargs get unpacked into the imshow calls for the four images. Returns
rgbmatplotlib.image.AxesImage
rmatplotlib.image.AxesImage
gmatplotlib.image.AxesImage
bmatplotlib.image.AxesImage
Examples using mpl_toolkits.axes_grid1.axes_rgb.RGBAxes
Showing RGB channels using RGBAxes | matplotlib._as_gen.mpl_toolkits.axes_grid1.axes_rgb.rgbaxes |
imshow_rgb(r, g, b, **kwargs)[source]
Create the four images {rgb, r, g, b}. Parameters
r, g, barray-like
The red, green, and blue arrays.
kwargsimshow kwargs
kwargs get unpacked into the imshow calls for the four images. Returns
rgbmatplotlib.image.AxesImage
rmatplotlib.image.AxesImage
gmatplotlib.image.AxesImage
bmatplotlib.image.AxesImage | matplotlib._as_gen.mpl_toolkits.axes_grid1.axes_rgb.rgbaxes#mpl_toolkits.axes_grid1.axes_rgb.RGBAxes.imshow_rgb |
mpl_toolkits.axes_grid1.axes_size Provides classes of simple units that will be used with AxesDivider class (or others) to determine the size of each axes. The unit classes define get_size method that returns a tuple of two floats, meaning relative and absolute sizes, respectively. Note that this class is nothing more than a simple tuple of two floats. Take a look at the Divider class to see how these two values are used. Classes
Add(a, b)
AddList(add_list)
AxesX(axes[, aspect, ref_ax]) Scaled size whose relative part corresponds to the data width of the axes multiplied by the aspect.
AxesY(axes[, aspect, ref_ax]) Scaled size whose relative part corresponds to the data height of the axes multiplied by the aspect.
Fixed(fixed_size) Simple fixed size with absolute part = fixed_size and relative part = 0.
Fraction(fraction, ref_size) An instance whose size is a fraction of the ref_size.
GetExtentHelper(ax, direction)
MaxExtent(artist_list, w_or_h) Size whose absolute part is either the largest width or the largest height of the given artist_list.
MaxHeight(artist_list) Size whose absolute part is the largest height of the given artist_list.
MaxWidth(artist_list) Size whose absolute part is the largest width of the given artist_list.
Padded(size, pad) Return a instance where the absolute part of size is increase by the amount of pad.
Scalable alias of mpl_toolkits.axes_grid1.axes_size.Scaled
Scaled(scalable_size) Simple scaled(?) size with absolute part = 0 and relative part = scalable_size.
SizeFromFunc(func) Functions
from_any(size[, fraction_ref]) Create a Fixed unit when the first argument is a float, or a Fraction unit if that is a string that ends with %. | matplotlib._as_gen.mpl_toolkits.axes_grid1.axes_size |
mpl_toolkits.axes_grid1.axes_size.Add classmpl_toolkits.axes_grid1.axes_size.Add(a, b)[source]
Bases: mpl_toolkits.axes_grid1.axes_size._Base get_size(renderer)[source] | matplotlib._as_gen.mpl_toolkits.axes_grid1.axes_size.add |
get_size(renderer)[source] | matplotlib._as_gen.mpl_toolkits.axes_grid1.axes_size.add#mpl_toolkits.axes_grid1.axes_size.Add.get_size |
mpl_toolkits.axes_grid1.axes_size.AddList classmpl_toolkits.axes_grid1.axes_size.AddList(add_list)[source]
Bases: mpl_toolkits.axes_grid1.axes_size._Base get_size(renderer)[source] | matplotlib._as_gen.mpl_toolkits.axes_grid1.axes_size.addlist |
get_size(renderer)[source] | matplotlib._as_gen.mpl_toolkits.axes_grid1.axes_size.addlist#mpl_toolkits.axes_grid1.axes_size.AddList.get_size |
mpl_toolkits.axes_grid1.axes_size.AxesX classmpl_toolkits.axes_grid1.axes_size.AxesX(axes, aspect=1.0, ref_ax=None)[source]
Bases: mpl_toolkits.axes_grid1.axes_size._Base Scaled size whose relative part corresponds to the data width of the axes multiplied by the aspect. get_size(renderer)[source]
Examples using mpl_toolkits.axes_grid1.axes_size.AxesX
HBoxDivider demo
Simple Axes Divider 3 | matplotlib._as_gen.mpl_toolkits.axes_grid1.axes_size.axesx |
get_size(renderer)[source] | matplotlib._as_gen.mpl_toolkits.axes_grid1.axes_size.axesx#mpl_toolkits.axes_grid1.axes_size.AxesX.get_size |
mpl_toolkits.axes_grid1.axes_size.AxesY classmpl_toolkits.axes_grid1.axes_size.AxesY(axes, aspect=1.0, ref_ax=None)[source]
Bases: mpl_toolkits.axes_grid1.axes_size._Base Scaled size whose relative part corresponds to the data height of the axes multiplied by the aspect. get_size(renderer)[source]
Examples using mpl_toolkits.axes_grid1.axes_size.AxesY
HBoxDivider demo
Simple Axes Divider 3 | matplotlib._as_gen.mpl_toolkits.axes_grid1.axes_size.axesy |
get_size(renderer)[source] | matplotlib._as_gen.mpl_toolkits.axes_grid1.axes_size.axesy#mpl_toolkits.axes_grid1.axes_size.AxesY.get_size |
mpl_toolkits.axes_grid1.axes_size.Fixed classmpl_toolkits.axes_grid1.axes_size.Fixed(fixed_size)[source]
Bases: mpl_toolkits.axes_grid1.axes_size._Base Simple fixed size with absolute part = fixed_size and relative part = 0. get_size(renderer)[source]
Examples using mpl_toolkits.axes_grid1.axes_size.Fixed
HBoxDivider demo
Axes with a fixed physical size
Simple Axes Divider 1
Simple Axes Divider 3 | matplotlib._as_gen.mpl_toolkits.axes_grid1.axes_size.fixed |
get_size(renderer)[source] | matplotlib._as_gen.mpl_toolkits.axes_grid1.axes_size.fixed#mpl_toolkits.axes_grid1.axes_size.Fixed.get_size |
mpl_toolkits.axes_grid1.axes_size.Fraction classmpl_toolkits.axes_grid1.axes_size.Fraction(fraction, ref_size)[source]
Bases: mpl_toolkits.axes_grid1.axes_size._Base An instance whose size is a fraction of the ref_size. >>> s = Fraction(0.3, AxesX(ax))
get_size(renderer)[source] | matplotlib._as_gen.mpl_toolkits.axes_grid1.axes_size.fraction |
get_size(renderer)[source] | matplotlib._as_gen.mpl_toolkits.axes_grid1.axes_size.fraction#mpl_toolkits.axes_grid1.axes_size.Fraction.get_size |
mpl_toolkits.axes_grid1.axes_size.from_any mpl_toolkits.axes_grid1.axes_size.from_any(size, fraction_ref=None)[source]
Create a Fixed unit when the first argument is a float, or a Fraction unit if that is a string that ends with %. The second argument is only meaningful when Fraction unit is created. >>> a = Size.from_any(1.2) # => Size.Fixed(1.2)
>>> Size.from_any("50%", a) # => Size.Fraction(0.5, a) | matplotlib._as_gen.mpl_toolkits.axes_grid1.axes_size.from_any |
mpl_toolkits.axes_grid1.axes_size.GetExtentHelper classmpl_toolkits.axes_grid1.axes_size.GetExtentHelper(ax, direction)[source]
Bases: object __call__(renderer)[source]
Call self as a function. | matplotlib._as_gen.mpl_toolkits.axes_grid1.axes_size.getextenthelper |
__call__(renderer)[source]
Call self as a function. | matplotlib._as_gen.mpl_toolkits.axes_grid1.axes_size.getextenthelper#mpl_toolkits.axes_grid1.axes_size.GetExtentHelper.__call__ |
mpl_toolkits.axes_grid1.axes_size.MaxExtent classmpl_toolkits.axes_grid1.axes_size.MaxExtent(artist_list, w_or_h)[source]
Bases: mpl_toolkits.axes_grid1.axes_size._Base Size whose absolute part is either the largest width or the largest height of the given artist_list. add_artist(a)[source]
get_size(renderer)[source] | matplotlib._as_gen.mpl_toolkits.axes_grid1.axes_size.maxextent |
add_artist(a)[source] | matplotlib._as_gen.mpl_toolkits.axes_grid1.axes_size.maxextent#mpl_toolkits.axes_grid1.axes_size.MaxExtent.add_artist |
get_size(renderer)[source] | matplotlib._as_gen.mpl_toolkits.axes_grid1.axes_size.maxextent#mpl_toolkits.axes_grid1.axes_size.MaxExtent.get_size |
mpl_toolkits.axes_grid1.axes_size.MaxHeight classmpl_toolkits.axes_grid1.axes_size.MaxHeight(artist_list)[source]
Bases: mpl_toolkits.axes_grid1.axes_size.MaxExtent Size whose absolute part is the largest height of the given artist_list. | matplotlib._as_gen.mpl_toolkits.axes_grid1.axes_size.maxheight |
mpl_toolkits.axes_grid1.axes_size.MaxWidth classmpl_toolkits.axes_grid1.axes_size.MaxWidth(artist_list)[source]
Bases: mpl_toolkits.axes_grid1.axes_size.MaxExtent Size whose absolute part is the largest width of the given artist_list. | matplotlib._as_gen.mpl_toolkits.axes_grid1.axes_size.maxwidth |
mpl_toolkits.axes_grid1.axes_size.Padded classmpl_toolkits.axes_grid1.axes_size.Padded(size, pad)[source]
Bases: mpl_toolkits.axes_grid1.axes_size._Base Return a instance where the absolute part of size is increase by the amount of pad. get_size(renderer)[source] | matplotlib._as_gen.mpl_toolkits.axes_grid1.axes_size.padded |
get_size(renderer)[source] | matplotlib._as_gen.mpl_toolkits.axes_grid1.axes_size.padded#mpl_toolkits.axes_grid1.axes_size.Padded.get_size |
mpl_toolkits.axes_grid1.axes_size.Scalable mpl_toolkits.axes_grid1.axes_size.Scalable[source]
alias of mpl_toolkits.axes_grid1.axes_size.Scaled | matplotlib._as_gen.mpl_toolkits.axes_grid1.axes_size.scalable |
mpl_toolkits.axes_grid1.axes_size.Scaled classmpl_toolkits.axes_grid1.axes_size.Scaled(scalable_size)[source]
Bases: mpl_toolkits.axes_grid1.axes_size._Base Simple scaled(?) size with absolute part = 0 and relative part = scalable_size. get_size(renderer)[source]
Examples using mpl_toolkits.axes_grid1.axes_size.Scaled
HBoxDivider demo
Axes with a fixed physical size
Simple Axes Divider 1 | matplotlib._as_gen.mpl_toolkits.axes_grid1.axes_size.scaled |
get_size(renderer)[source] | matplotlib._as_gen.mpl_toolkits.axes_grid1.axes_size.scaled#mpl_toolkits.axes_grid1.axes_size.Scaled.get_size |
mpl_toolkits.axes_grid1.axes_size.SizeFromFunc classmpl_toolkits.axes_grid1.axes_size.SizeFromFunc(func)[source]
Bases: mpl_toolkits.axes_grid1.axes_size._Base get_size(renderer)[source] | matplotlib._as_gen.mpl_toolkits.axes_grid1.axes_size.sizefromfunc |
get_size(renderer)[source] | matplotlib._as_gen.mpl_toolkits.axes_grid1.axes_size.sizefromfunc#mpl_toolkits.axes_grid1.axes_size.SizeFromFunc.get_size |
mpl_toolkits.axes_grid1.inset_locator A collection of functions and objects for creating or placing inset axes. Classes
AnchoredLocatorBase(bbox_to_anchor, ...[, ...])
Parameters
AnchoredSizeLocator(bbox_to_anchor, x_size, ...)
Parameters
AnchoredZoomLocator(parent_axes, zoom, loc)
Parameters
BboxConnector(bbox1, bbox2, loc1[, loc2]) Connect two bboxes with a straight line.
BboxConnectorPatch(bbox1, bbox2, loc1a, ...) Connect two bboxes with a quadrilateral.
BboxPatch(bbox, **kwargs) Patch showing the shape bounded by a Bbox.
InsetPosition(parent, lbwh) An object for positioning an inset axes. Functions
inset_axes(parent_axes, width, height[, ...]) Create an inset axes with a given width and height.
mark_inset(parent_axes, inset_axes, loc1, ...) Draw a box to mark the location of an area represented by an inset axes.
zoomed_inset_axes(parent_axes, zoom[, loc, ...]) Create an anchored inset axes by scaling a parent axes. | matplotlib._as_gen.mpl_toolkits.axes_grid1.inset_locator |
mpl_toolkits.axes_grid1.inset_locator.AnchoredLocatorBase classmpl_toolkits.axes_grid1.inset_locator.AnchoredLocatorBase(bbox_to_anchor, offsetbox, loc, borderpad=0.5, bbox_transform=None)[source]
Bases: matplotlib.offsetbox.AnchoredOffsetbox Parameters
locstr
The box location. Valid locations are 'upper left', 'upper center', 'upper right', 'center left', 'center', 'center right', 'lower left', 'lower center, 'lower right'. For backward compatibility, numeric values are accepted as well. See the parameter loc of Legend for details.
padfloat, default: 0.4
Padding around the child as fraction of the fontsize.
borderpadfloat, default: 0.5
Padding between the offsetbox frame and the bbox_to_anchor.
childOffsetBox
The box that will be anchored.
propFontProperties
This is only used as a reference for paddings. If not given, rcParams["legend.fontsize"] (default: 'medium') is used.
frameonbool
Whether to draw a frame around the box.
bbox_to_anchorBboxBase, 2-tuple, or 4-tuple of floats
Box that is used to position the legend in conjunction with loc.
bbox_transformNone or matplotlib.transforms.Transform
The transform for the bounding box (bbox_to_anchor). **kwargs
All other parameters are passed on to OffsetBox. Notes See Legend for a detailed description of the anchoring mechanism. __call__(ax, renderer)[source]
Call self as a function.
draw(renderer)[source]
Update the location of children if necessary and draw them to the given renderer.
set(*, agg_filter=<UNSET>, alpha=<UNSET>, animated=<UNSET>, bbox_to_anchor=<UNSET>, child=<UNSET>, clip_box=<UNSET>, clip_on=<UNSET>, clip_path=<UNSET>, gid=<UNSET>, height=<UNSET>, in_layout=<UNSET>, label=<UNSET>, offset=<UNSET>, path_effects=<UNSET>, picker=<UNSET>, rasterized=<UNSET>, sketch_params=<UNSET>, snap=<UNSET>, transform=<UNSET>, url=<UNSET>, visible=<UNSET>, width=<UNSET>, zorder=<UNSET>)[source]
Set multiple properties at once. Supported properties are
Property Description
agg_filter a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array
alpha scalar or None
animated bool
bbox_to_anchor unknown
child unknown
clip_box Bbox
clip_on bool
clip_path Patch or (Path, Transform) or None
figure Figure
gid str
height float
in_layout bool
label object
offset (float, float) or callable
path_effects AbstractPathEffect
picker None or bool or float or callable
rasterized bool
sketch_params (scale: float, length: float, randomness: float)
snap bool or None
transform Transform
url str
visible bool
width float
zorder float | matplotlib._as_gen.mpl_toolkits.axes_grid1.inset_locator.anchoredlocatorbase |
__call__(ax, renderer)[source]
Call self as a function. | matplotlib._as_gen.mpl_toolkits.axes_grid1.inset_locator.anchoredlocatorbase#mpl_toolkits.axes_grid1.inset_locator.AnchoredLocatorBase.__call__ |
draw(renderer)[source]
Update the location of children if necessary and draw them to the given renderer. | matplotlib._as_gen.mpl_toolkits.axes_grid1.inset_locator.anchoredlocatorbase#mpl_toolkits.axes_grid1.inset_locator.AnchoredLocatorBase.draw |
set(*, agg_filter=<UNSET>, alpha=<UNSET>, animated=<UNSET>, bbox_to_anchor=<UNSET>, child=<UNSET>, clip_box=<UNSET>, clip_on=<UNSET>, clip_path=<UNSET>, gid=<UNSET>, height=<UNSET>, in_layout=<UNSET>, label=<UNSET>, offset=<UNSET>, path_effects=<UNSET>, picker=<UNSET>, rasterized=<UNSET>, sketch_params=<UNSET>, snap=<UNSET>, transform=<UNSET>, url=<UNSET>, visible=<UNSET>, width=<UNSET>, zorder=<UNSET>)[source]
Set multiple properties at once. Supported properties are
Property Description
agg_filter a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array
alpha scalar or None
animated bool
bbox_to_anchor unknown
child unknown
clip_box Bbox
clip_on bool
clip_path Patch or (Path, Transform) or None
figure Figure
gid str
height float
in_layout bool
label object
offset (float, float) or callable
path_effects AbstractPathEffect
picker None or bool or float or callable
rasterized bool
sketch_params (scale: float, length: float, randomness: float)
snap bool or None
transform Transform
url str
visible bool
width float
zorder float | matplotlib._as_gen.mpl_toolkits.axes_grid1.inset_locator.anchoredlocatorbase#mpl_toolkits.axes_grid1.inset_locator.AnchoredLocatorBase.set |
mpl_toolkits.axes_grid1.inset_locator.AnchoredSizeLocator classmpl_toolkits.axes_grid1.inset_locator.AnchoredSizeLocator(bbox_to_anchor, x_size, y_size, loc, borderpad=0.5, bbox_transform=None)[source]
Bases: mpl_toolkits.axes_grid1.inset_locator.AnchoredLocatorBase Parameters
locstr
The box location. Valid locations are 'upper left', 'upper center', 'upper right', 'center left', 'center', 'center right', 'lower left', 'lower center, 'lower right'. For backward compatibility, numeric values are accepted as well. See the parameter loc of Legend for details.
padfloat, default: 0.4
Padding around the child as fraction of the fontsize.
borderpadfloat, default: 0.5
Padding between the offsetbox frame and the bbox_to_anchor.
childOffsetBox
The box that will be anchored.
propFontProperties
This is only used as a reference for paddings. If not given, rcParams["legend.fontsize"] (default: 'medium') is used.
frameonbool
Whether to draw a frame around the box.
bbox_to_anchorBboxBase, 2-tuple, or 4-tuple of floats
Box that is used to position the legend in conjunction with loc.
bbox_transformNone or matplotlib.transforms.Transform
The transform for the bounding box (bbox_to_anchor). **kwargs
All other parameters are passed on to OffsetBox. Notes See Legend for a detailed description of the anchoring mechanism. get_extent(renderer)[source]
Return the extent of the box as (width, height, x, y). This is the extent of the child plus the padding.
set(*, agg_filter=<UNSET>, alpha=<UNSET>, animated=<UNSET>, bbox_to_anchor=<UNSET>, child=<UNSET>, clip_box=<UNSET>, clip_on=<UNSET>, clip_path=<UNSET>, gid=<UNSET>, height=<UNSET>, in_layout=<UNSET>, label=<UNSET>, offset=<UNSET>, path_effects=<UNSET>, picker=<UNSET>, rasterized=<UNSET>, sketch_params=<UNSET>, snap=<UNSET>, transform=<UNSET>, url=<UNSET>, visible=<UNSET>, width=<UNSET>, zorder=<UNSET>)[source]
Set multiple properties at once. Supported properties are
Property Description
agg_filter a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array
alpha scalar or None
animated bool
bbox_to_anchor unknown
child unknown
clip_box Bbox
clip_on bool
clip_path Patch or (Path, Transform) or None
figure Figure
gid str
height float
in_layout bool
label object
offset (float, float) or callable
path_effects AbstractPathEffect
picker None or bool or float or callable
rasterized bool
sketch_params (scale: float, length: float, randomness: float)
snap bool or None
transform Transform
url str
visible bool
width float
zorder float | matplotlib._as_gen.mpl_toolkits.axes_grid1.inset_locator.anchoredsizelocator |
get_extent(renderer)[source]
Return the extent of the box as (width, height, x, y). This is the extent of the child plus the padding. | matplotlib._as_gen.mpl_toolkits.axes_grid1.inset_locator.anchoredsizelocator#mpl_toolkits.axes_grid1.inset_locator.AnchoredSizeLocator.get_extent |
set(*, agg_filter=<UNSET>, alpha=<UNSET>, animated=<UNSET>, bbox_to_anchor=<UNSET>, child=<UNSET>, clip_box=<UNSET>, clip_on=<UNSET>, clip_path=<UNSET>, gid=<UNSET>, height=<UNSET>, in_layout=<UNSET>, label=<UNSET>, offset=<UNSET>, path_effects=<UNSET>, picker=<UNSET>, rasterized=<UNSET>, sketch_params=<UNSET>, snap=<UNSET>, transform=<UNSET>, url=<UNSET>, visible=<UNSET>, width=<UNSET>, zorder=<UNSET>)[source]
Set multiple properties at once. Supported properties are
Property Description
agg_filter a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array
alpha scalar or None
animated bool
bbox_to_anchor unknown
child unknown
clip_box Bbox
clip_on bool
clip_path Patch or (Path, Transform) or None
figure Figure
gid str
height float
in_layout bool
label object
offset (float, float) or callable
path_effects AbstractPathEffect
picker None or bool or float or callable
rasterized bool
sketch_params (scale: float, length: float, randomness: float)
snap bool or None
transform Transform
url str
visible bool
width float
zorder float | matplotlib._as_gen.mpl_toolkits.axes_grid1.inset_locator.anchoredsizelocator#mpl_toolkits.axes_grid1.inset_locator.AnchoredSizeLocator.set |
mpl_toolkits.axes_grid1.inset_locator.AnchoredZoomLocator classmpl_toolkits.axes_grid1.inset_locator.AnchoredZoomLocator(parent_axes, zoom, loc, borderpad=0.5, bbox_to_anchor=None, bbox_transform=None)[source]
Bases: mpl_toolkits.axes_grid1.inset_locator.AnchoredLocatorBase Parameters
locstr
The box location. Valid locations are 'upper left', 'upper center', 'upper right', 'center left', 'center', 'center right', 'lower left', 'lower center, 'lower right'. For backward compatibility, numeric values are accepted as well. See the parameter loc of Legend for details.
padfloat, default: 0.4
Padding around the child as fraction of the fontsize.
borderpadfloat, default: 0.5
Padding between the offsetbox frame and the bbox_to_anchor.
childOffsetBox
The box that will be anchored.
propFontProperties
This is only used as a reference for paddings. If not given, rcParams["legend.fontsize"] (default: 'medium') is used.
frameonbool
Whether to draw a frame around the box.
bbox_to_anchorBboxBase, 2-tuple, or 4-tuple of floats
Box that is used to position the legend in conjunction with loc.
bbox_transformNone or matplotlib.transforms.Transform
The transform for the bounding box (bbox_to_anchor). **kwargs
All other parameters are passed on to OffsetBox. Notes See Legend for a detailed description of the anchoring mechanism. get_extent(renderer)[source]
Return the extent of the box as (width, height, x, y). This is the extent of the child plus the padding.
set(*, agg_filter=<UNSET>, alpha=<UNSET>, animated=<UNSET>, bbox_to_anchor=<UNSET>, child=<UNSET>, clip_box=<UNSET>, clip_on=<UNSET>, clip_path=<UNSET>, gid=<UNSET>, height=<UNSET>, in_layout=<UNSET>, label=<UNSET>, offset=<UNSET>, path_effects=<UNSET>, picker=<UNSET>, rasterized=<UNSET>, sketch_params=<UNSET>, snap=<UNSET>, transform=<UNSET>, url=<UNSET>, visible=<UNSET>, width=<UNSET>, zorder=<UNSET>)[source]
Set multiple properties at once. Supported properties are
Property Description
agg_filter a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array
alpha scalar or None
animated bool
bbox_to_anchor unknown
child unknown
clip_box Bbox
clip_on bool
clip_path Patch or (Path, Transform) or None
figure Figure
gid str
height float
in_layout bool
label object
offset (float, float) or callable
path_effects AbstractPathEffect
picker None or bool or float or callable
rasterized bool
sketch_params (scale: float, length: float, randomness: float)
snap bool or None
transform Transform
url str
visible bool
width float
zorder float | matplotlib._as_gen.mpl_toolkits.axes_grid1.inset_locator.anchoredzoomlocator |
get_extent(renderer)[source]
Return the extent of the box as (width, height, x, y). This is the extent of the child plus the padding. | matplotlib._as_gen.mpl_toolkits.axes_grid1.inset_locator.anchoredzoomlocator#mpl_toolkits.axes_grid1.inset_locator.AnchoredZoomLocator.get_extent |
set(*, agg_filter=<UNSET>, alpha=<UNSET>, animated=<UNSET>, bbox_to_anchor=<UNSET>, child=<UNSET>, clip_box=<UNSET>, clip_on=<UNSET>, clip_path=<UNSET>, gid=<UNSET>, height=<UNSET>, in_layout=<UNSET>, label=<UNSET>, offset=<UNSET>, path_effects=<UNSET>, picker=<UNSET>, rasterized=<UNSET>, sketch_params=<UNSET>, snap=<UNSET>, transform=<UNSET>, url=<UNSET>, visible=<UNSET>, width=<UNSET>, zorder=<UNSET>)[source]
Set multiple properties at once. Supported properties are
Property Description
agg_filter a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array
alpha scalar or None
animated bool
bbox_to_anchor unknown
child unknown
clip_box Bbox
clip_on bool
clip_path Patch or (Path, Transform) or None
figure Figure
gid str
height float
in_layout bool
label object
offset (float, float) or callable
path_effects AbstractPathEffect
picker None or bool or float or callable
rasterized bool
sketch_params (scale: float, length: float, randomness: float)
snap bool or None
transform Transform
url str
visible bool
width float
zorder float | matplotlib._as_gen.mpl_toolkits.axes_grid1.inset_locator.anchoredzoomlocator#mpl_toolkits.axes_grid1.inset_locator.AnchoredZoomLocator.set |
mpl_toolkits.axes_grid1.inset_locator.BboxConnector classmpl_toolkits.axes_grid1.inset_locator.BboxConnector(bbox1, bbox2, loc1, loc2=None, **kwargs)[source]
Bases: matplotlib.patches.Patch Connect two bboxes with a straight line. Parameters
bbox1, bbox2matplotlib.transforms.Bbox
Bounding boxes to connect.
loc1{1, 2, 3, 4}
Corner of bbox1 to draw the line. Valid values are: 'upper right' : 1,
'upper left' : 2,
'lower left' : 3,
'lower right' : 4
loc2{1, 2, 3, 4}, optional
Corner of bbox2 to draw the line. If None, defaults to loc1. Valid values are: 'upper right' : 1,
'upper left' : 2,
'lower left' : 3,
'lower right' : 4
**kwargs
Patch properties for the line drawn. Valid arguments include:
Property Description
agg_filter a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array
alpha unknown
animated bool
antialiased or aa bool or None
capstyle CapStyle or {'butt', 'projecting', 'round'}
clip_box Bbox
clip_on bool
clip_path Patch or (Path, Transform) or None
color color
edgecolor or ec color or None
facecolor or fc color or None
figure Figure
fill bool
gid str
hatch {'/', '\', '|', '-', '+', 'x', 'o', 'O', '.', '*'}
in_layout bool
joinstyle JoinStyle or {'miter', 'round', 'bevel'}
label object
linestyle or ls {'-', '--', '-.', ':', '', (offset, on-off-seq), ...}
linewidth or lw float or None
path_effects AbstractPathEffect
picker None or bool or float or callable
rasterized bool
sketch_params (scale: float, length: float, randomness: float)
snap bool or None
transform Transform
url str
visible bool
zorder float staticconnect_bbox(bbox1, bbox2, loc1, loc2=None)[source]
Helper function to obtain a Path from one bbox to another. Parameters
bbox1, bbox2matplotlib.transforms.Bbox
Bounding boxes to connect.
loc1{1, 2, 3, 4}
Corner of bbox1 to use. Valid values are: 'upper right' : 1,
'upper left' : 2,
'lower left' : 3,
'lower right' : 4
loc2{1, 2, 3, 4}, optional
Corner of bbox2 to use. If None, defaults to loc1. Valid values are: 'upper right' : 1,
'upper left' : 2,
'lower left' : 3,
'lower right' : 4
Returns
pathmatplotlib.path.Path
A line segment from the loc1 corner of bbox1 to the loc2 corner of bbox2.
staticget_bbox_edge_pos(bbox, loc)[source]
Helper function to obtain the location of a corner of a bbox Parameters
bboxmatplotlib.transforms.Bbox
loc{1, 2, 3, 4}
Corner of bbox. Valid values are: 'upper right' : 1,
'upper left' : 2,
'lower left' : 3,
'lower right' : 4
Returns
x, yfloat
Coordinates of the corner specified by loc.
get_path()[source]
Return the path of this patch.
set(*, agg_filter=<UNSET>, alpha=<UNSET>, animated=<UNSET>, antialiased=<UNSET>, capstyle=<UNSET>, clip_box=<UNSET>, clip_on=<UNSET>, clip_path=<UNSET>, color=<UNSET>, edgecolor=<UNSET>, facecolor=<UNSET>, fill=<UNSET>, gid=<UNSET>, hatch=<UNSET>, in_layout=<UNSET>, joinstyle=<UNSET>, label=<UNSET>, linestyle=<UNSET>, linewidth=<UNSET>, path_effects=<UNSET>, picker=<UNSET>, rasterized=<UNSET>, sketch_params=<UNSET>, snap=<UNSET>, transform=<UNSET>, url=<UNSET>, visible=<UNSET>, zorder=<UNSET>)[source]
Set multiple properties at once. Supported properties are
Property Description
agg_filter a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array
alpha scalar or None
animated bool
antialiased or aa bool or None
capstyle CapStyle or {'butt', 'projecting', 'round'}
clip_box Bbox
clip_on bool
clip_path Patch or (Path, Transform) or None
color color
edgecolor or ec color or None
facecolor or fc color or None
figure Figure
fill bool
gid str
hatch {'/', '\', '|', '-', '+', 'x', 'o', 'O', '.', '*'}
in_layout bool
joinstyle JoinStyle or {'miter', 'round', 'bevel'}
label object
linestyle or ls {'-', '--', '-.', ':', '', (offset, on-off-seq), ...}
linewidth or lw float or None
path_effects AbstractPathEffect
picker None or bool or float or callable
rasterized bool
sketch_params (scale: float, length: float, randomness: float)
snap bool or None
transform Transform
url str
visible bool
zorder float
Examples using mpl_toolkits.axes_grid1.inset_locator.BboxConnector
Axes Zoom Effect | matplotlib._as_gen.mpl_toolkits.axes_grid1.inset_locator.bboxconnector |
staticconnect_bbox(bbox1, bbox2, loc1, loc2=None)[source]
Helper function to obtain a Path from one bbox to another. Parameters
bbox1, bbox2matplotlib.transforms.Bbox
Bounding boxes to connect.
loc1{1, 2, 3, 4}
Corner of bbox1 to use. Valid values are: 'upper right' : 1,
'upper left' : 2,
'lower left' : 3,
'lower right' : 4
loc2{1, 2, 3, 4}, optional
Corner of bbox2 to use. If None, defaults to loc1. Valid values are: 'upper right' : 1,
'upper left' : 2,
'lower left' : 3,
'lower right' : 4
Returns
pathmatplotlib.path.Path
A line segment from the loc1 corner of bbox1 to the loc2 corner of bbox2. | matplotlib._as_gen.mpl_toolkits.axes_grid1.inset_locator.bboxconnector#mpl_toolkits.axes_grid1.inset_locator.BboxConnector.connect_bbox |
staticget_bbox_edge_pos(bbox, loc)[source]
Helper function to obtain the location of a corner of a bbox Parameters
bboxmatplotlib.transforms.Bbox
loc{1, 2, 3, 4}
Corner of bbox. Valid values are: 'upper right' : 1,
'upper left' : 2,
'lower left' : 3,
'lower right' : 4
Returns
x, yfloat
Coordinates of the corner specified by loc. | matplotlib._as_gen.mpl_toolkits.axes_grid1.inset_locator.bboxconnector#mpl_toolkits.axes_grid1.inset_locator.BboxConnector.get_bbox_edge_pos |
get_path()[source]
Return the path of this patch. | matplotlib._as_gen.mpl_toolkits.axes_grid1.inset_locator.bboxconnector#mpl_toolkits.axes_grid1.inset_locator.BboxConnector.get_path |
set(*, agg_filter=<UNSET>, alpha=<UNSET>, animated=<UNSET>, antialiased=<UNSET>, capstyle=<UNSET>, clip_box=<UNSET>, clip_on=<UNSET>, clip_path=<UNSET>, color=<UNSET>, edgecolor=<UNSET>, facecolor=<UNSET>, fill=<UNSET>, gid=<UNSET>, hatch=<UNSET>, in_layout=<UNSET>, joinstyle=<UNSET>, label=<UNSET>, linestyle=<UNSET>, linewidth=<UNSET>, path_effects=<UNSET>, picker=<UNSET>, rasterized=<UNSET>, sketch_params=<UNSET>, snap=<UNSET>, transform=<UNSET>, url=<UNSET>, visible=<UNSET>, zorder=<UNSET>)[source]
Set multiple properties at once. Supported properties are
Property Description
agg_filter a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array
alpha scalar or None
animated bool
antialiased or aa bool or None
capstyle CapStyle or {'butt', 'projecting', 'round'}
clip_box Bbox
clip_on bool
clip_path Patch or (Path, Transform) or None
color color
edgecolor or ec color or None
facecolor or fc color or None
figure Figure
fill bool
gid str
hatch {'/', '\', '|', '-', '+', 'x', 'o', 'O', '.', '*'}
in_layout bool
joinstyle JoinStyle or {'miter', 'round', 'bevel'}
label object
linestyle or ls {'-', '--', '-.', ':', '', (offset, on-off-seq), ...}
linewidth or lw float or None
path_effects AbstractPathEffect
picker None or bool or float or callable
rasterized bool
sketch_params (scale: float, length: float, randomness: float)
snap bool or None
transform Transform
url str
visible bool
zorder float | matplotlib._as_gen.mpl_toolkits.axes_grid1.inset_locator.bboxconnector#mpl_toolkits.axes_grid1.inset_locator.BboxConnector.set |
mpl_toolkits.axes_grid1.inset_locator.BboxConnectorPatch classmpl_toolkits.axes_grid1.inset_locator.BboxConnectorPatch(bbox1, bbox2, loc1a, loc2a, loc1b, loc2b, **kwargs)[source]
Bases: mpl_toolkits.axes_grid1.inset_locator.BboxConnector Connect two bboxes with a quadrilateral. The quadrilateral is specified by two lines that start and end at corners of the bboxes. The four sides of the quadrilateral are defined by the two lines given, the line between the two corners specified in bbox1 and the line between the two corners specified in bbox2. Parameters
bbox1, bbox2matplotlib.transforms.Bbox
Bounding boxes to connect.
loc1a, loc2a{1, 2, 3, 4}
Corners of bbox1 and bbox2 to draw the first line. Valid values are: 'upper right' : 1,
'upper left' : 2,
'lower left' : 3,
'lower right' : 4
loc1b, loc2b{1, 2, 3, 4}
Corners of bbox1 and bbox2 to draw the second line. Valid values are: 'upper right' : 1,
'upper left' : 2,
'lower left' : 3,
'lower right' : 4
**kwargs
Patch properties for the line drawn:
Property Description
agg_filter a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array
alpha unknown
animated bool
antialiased or aa bool or None
capstyle CapStyle or {'butt', 'projecting', 'round'}
clip_box Bbox
clip_on bool
clip_path Patch or (Path, Transform) or None
color color
edgecolor or ec color or None
facecolor or fc color or None
figure Figure
fill bool
gid str
hatch {'/', '\', '|', '-', '+', 'x', 'o', 'O', '.', '*'}
in_layout bool
joinstyle JoinStyle or {'miter', 'round', 'bevel'}
label object
linestyle or ls {'-', '--', '-.', ':', '', (offset, on-off-seq), ...}
linewidth or lw float or None
path_effects AbstractPathEffect
picker None or bool or float or callable
rasterized bool
sketch_params (scale: float, length: float, randomness: float)
snap bool or None
transform Transform
url str
visible bool
zorder float get_path()[source]
Return the path of this patch.
set(*, agg_filter=<UNSET>, alpha=<UNSET>, animated=<UNSET>, antialiased=<UNSET>, capstyle=<UNSET>, clip_box=<UNSET>, clip_on=<UNSET>, clip_path=<UNSET>, color=<UNSET>, edgecolor=<UNSET>, facecolor=<UNSET>, fill=<UNSET>, gid=<UNSET>, hatch=<UNSET>, in_layout=<UNSET>, joinstyle=<UNSET>, label=<UNSET>, linestyle=<UNSET>, linewidth=<UNSET>, path_effects=<UNSET>, picker=<UNSET>, rasterized=<UNSET>, sketch_params=<UNSET>, snap=<UNSET>, transform=<UNSET>, url=<UNSET>, visible=<UNSET>, zorder=<UNSET>)[source]
Set multiple properties at once. Supported properties are
Property Description
agg_filter a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array
alpha scalar or None
animated bool
antialiased or aa bool or None
capstyle CapStyle or {'butt', 'projecting', 'round'}
clip_box Bbox
clip_on bool
clip_path Patch or (Path, Transform) or None
color color
edgecolor or ec color or None
facecolor or fc color or None
figure Figure
fill bool
gid str
hatch {'/', '\', '|', '-', '+', 'x', 'o', 'O', '.', '*'}
in_layout bool
joinstyle JoinStyle or {'miter', 'round', 'bevel'}
label object
linestyle or ls {'-', '--', '-.', ':', '', (offset, on-off-seq), ...}
linewidth or lw float or None
path_effects AbstractPathEffect
picker None or bool or float or callable
rasterized bool
sketch_params (scale: float, length: float, randomness: float)
snap bool or None
transform Transform
url str
visible bool
zorder float
Examples using mpl_toolkits.axes_grid1.inset_locator.BboxConnectorPatch
Axes Zoom Effect | matplotlib._as_gen.mpl_toolkits.axes_grid1.inset_locator.bboxconnectorpatch |
get_path()[source]
Return the path of this patch. | matplotlib._as_gen.mpl_toolkits.axes_grid1.inset_locator.bboxconnectorpatch#mpl_toolkits.axes_grid1.inset_locator.BboxConnectorPatch.get_path |
set(*, agg_filter=<UNSET>, alpha=<UNSET>, animated=<UNSET>, antialiased=<UNSET>, capstyle=<UNSET>, clip_box=<UNSET>, clip_on=<UNSET>, clip_path=<UNSET>, color=<UNSET>, edgecolor=<UNSET>, facecolor=<UNSET>, fill=<UNSET>, gid=<UNSET>, hatch=<UNSET>, in_layout=<UNSET>, joinstyle=<UNSET>, label=<UNSET>, linestyle=<UNSET>, linewidth=<UNSET>, path_effects=<UNSET>, picker=<UNSET>, rasterized=<UNSET>, sketch_params=<UNSET>, snap=<UNSET>, transform=<UNSET>, url=<UNSET>, visible=<UNSET>, zorder=<UNSET>)[source]
Set multiple properties at once. Supported properties are
Property Description
agg_filter a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array
alpha scalar or None
animated bool
antialiased or aa bool or None
capstyle CapStyle or {'butt', 'projecting', 'round'}
clip_box Bbox
clip_on bool
clip_path Patch or (Path, Transform) or None
color color
edgecolor or ec color or None
facecolor or fc color or None
figure Figure
fill bool
gid str
hatch {'/', '\', '|', '-', '+', 'x', 'o', 'O', '.', '*'}
in_layout bool
joinstyle JoinStyle or {'miter', 'round', 'bevel'}
label object
linestyle or ls {'-', '--', '-.', ':', '', (offset, on-off-seq), ...}
linewidth or lw float or None
path_effects AbstractPathEffect
picker None or bool or float or callable
rasterized bool
sketch_params (scale: float, length: float, randomness: float)
snap bool or None
transform Transform
url str
visible bool
zorder float | matplotlib._as_gen.mpl_toolkits.axes_grid1.inset_locator.bboxconnectorpatch#mpl_toolkits.axes_grid1.inset_locator.BboxConnectorPatch.set |
mpl_toolkits.axes_grid1.inset_locator.BboxPatch classmpl_toolkits.axes_grid1.inset_locator.BboxPatch(bbox, **kwargs)[source]
Bases: matplotlib.patches.Patch Patch showing the shape bounded by a Bbox. Parameters
bboxmatplotlib.transforms.Bbox
Bbox to use for the extents of this patch. **kwargs
Patch properties. Valid arguments include:
Property Description
agg_filter a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array
alpha unknown
animated bool
antialiased or aa bool or None
capstyle CapStyle or {'butt', 'projecting', 'round'}
clip_box Bbox
clip_on bool
clip_path Patch or (Path, Transform) or None
color color
edgecolor or ec color or None
facecolor or fc color or None
figure Figure
fill bool
gid str
hatch {'/', '\', '|', '-', '+', 'x', 'o', 'O', '.', '*'}
in_layout bool
joinstyle JoinStyle or {'miter', 'round', 'bevel'}
label object
linestyle or ls {'-', '--', '-.', ':', '', (offset, on-off-seq), ...}
linewidth or lw float or None
path_effects AbstractPathEffect
picker None or bool or float or callable
rasterized bool
sketch_params (scale: float, length: float, randomness: float)
snap bool or None
transform Transform
url str
visible bool
zorder float get_path()[source]
Return the path of this patch.
set(*, agg_filter=<UNSET>, alpha=<UNSET>, animated=<UNSET>, antialiased=<UNSET>, capstyle=<UNSET>, clip_box=<UNSET>, clip_on=<UNSET>, clip_path=<UNSET>, color=<UNSET>, edgecolor=<UNSET>, facecolor=<UNSET>, fill=<UNSET>, gid=<UNSET>, hatch=<UNSET>, in_layout=<UNSET>, joinstyle=<UNSET>, label=<UNSET>, linestyle=<UNSET>, linewidth=<UNSET>, path_effects=<UNSET>, picker=<UNSET>, rasterized=<UNSET>, sketch_params=<UNSET>, snap=<UNSET>, transform=<UNSET>, url=<UNSET>, visible=<UNSET>, zorder=<UNSET>)[source]
Set multiple properties at once. Supported properties are
Property Description
agg_filter a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array
alpha scalar or None
animated bool
antialiased or aa bool or None
capstyle CapStyle or {'butt', 'projecting', 'round'}
clip_box Bbox
clip_on bool
clip_path Patch or (Path, Transform) or None
color color
edgecolor or ec color or None
facecolor or fc color or None
figure Figure
fill bool
gid str
hatch {'/', '\', '|', '-', '+', 'x', 'o', 'O', '.', '*'}
in_layout bool
joinstyle JoinStyle or {'miter', 'round', 'bevel'}
label object
linestyle or ls {'-', '--', '-.', ':', '', (offset, on-off-seq), ...}
linewidth or lw float or None
path_effects AbstractPathEffect
picker None or bool or float or callable
rasterized bool
sketch_params (scale: float, length: float, randomness: float)
snap bool or None
transform Transform
url str
visible bool
zorder float
Examples using mpl_toolkits.axes_grid1.inset_locator.BboxPatch
Axes Zoom Effect | matplotlib._as_gen.mpl_toolkits.axes_grid1.inset_locator.bboxpatch |
get_path()[source]
Return the path of this patch. | matplotlib._as_gen.mpl_toolkits.axes_grid1.inset_locator.bboxpatch#mpl_toolkits.axes_grid1.inset_locator.BboxPatch.get_path |
set(*, agg_filter=<UNSET>, alpha=<UNSET>, animated=<UNSET>, antialiased=<UNSET>, capstyle=<UNSET>, clip_box=<UNSET>, clip_on=<UNSET>, clip_path=<UNSET>, color=<UNSET>, edgecolor=<UNSET>, facecolor=<UNSET>, fill=<UNSET>, gid=<UNSET>, hatch=<UNSET>, in_layout=<UNSET>, joinstyle=<UNSET>, label=<UNSET>, linestyle=<UNSET>, linewidth=<UNSET>, path_effects=<UNSET>, picker=<UNSET>, rasterized=<UNSET>, sketch_params=<UNSET>, snap=<UNSET>, transform=<UNSET>, url=<UNSET>, visible=<UNSET>, zorder=<UNSET>)[source]
Set multiple properties at once. Supported properties are
Property Description
agg_filter a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array
alpha scalar or None
animated bool
antialiased or aa bool or None
capstyle CapStyle or {'butt', 'projecting', 'round'}
clip_box Bbox
clip_on bool
clip_path Patch or (Path, Transform) or None
color color
edgecolor or ec color or None
facecolor or fc color or None
figure Figure
fill bool
gid str
hatch {'/', '\', '|', '-', '+', 'x', 'o', 'O', '.', '*'}
in_layout bool
joinstyle JoinStyle or {'miter', 'round', 'bevel'}
label object
linestyle or ls {'-', '--', '-.', ':', '', (offset, on-off-seq), ...}
linewidth or lw float or None
path_effects AbstractPathEffect
picker None or bool or float or callable
rasterized bool
sketch_params (scale: float, length: float, randomness: float)
snap bool or None
transform Transform
url str
visible bool
zorder float | matplotlib._as_gen.mpl_toolkits.axes_grid1.inset_locator.bboxpatch#mpl_toolkits.axes_grid1.inset_locator.BboxPatch.set |
mpl_toolkits.axes_grid1.inset_locator.inset_axes mpl_toolkits.axes_grid1.inset_locator.inset_axes(parent_axes, width, height, loc='upper right', bbox_to_anchor=None, bbox_transform=None, axes_class=None, axes_kwargs=None, borderpad=0.5)[source]
Create an inset axes with a given width and height. Both sizes used can be specified either in inches or percentage. For example,: inset_axes(parent_axes, width='40%', height='30%', loc='lower left')
creates in inset axes in the lower left corner of parent_axes which spans over 30% in height and 40% in width of the parent_axes. Since the usage of inset_axes may become slightly tricky when exceeding such standard cases, it is recommended to read the examples. Parameters
parent_axesmatplotlib.axes.Axes
Axes to place the inset axes.
width, heightfloat or str
Size of the inset axes to create. If a float is provided, it is the size in inches, e.g. width=1.3. If a string is provided, it is the size in relative units, e.g. width='40%'. By default, i.e. if neither bbox_to_anchor nor bbox_transform are specified, those are relative to the parent_axes. Otherwise they are to be understood relative to the bounding box provided via bbox_to_anchor.
locstr, default: 'upper right'
Location to place the inset axes. Valid locations are 'upper left', 'upper center', 'upper right', 'center left', 'center', 'center right', 'lower left', 'lower center, 'lower right'. For backward compatibility, numeric values are accepted as well. See the parameter loc of Legend for details.
bbox_to_anchortuple or matplotlib.transforms.BboxBase, optional
Bbox that the inset axes will be anchored to. If None, a tuple of (0, 0, 1, 1) is used if bbox_transform is set to parent_axes.transAxes or parent_axes.figure.transFigure. Otherwise, parent_axes.bbox is used. If a tuple, can be either [left, bottom, width, height], or [left, bottom]. If the kwargs width and/or height are specified in relative units, the 2-tuple [left, bottom] cannot be used. Note that, unless bbox_transform is set, the units of the bounding box are interpreted in the pixel coordinate. When using bbox_to_anchor with tuple, it almost always makes sense to also specify a bbox_transform. This might often be the axes transform parent_axes.transAxes.
bbox_transformmatplotlib.transforms.Transform, optional
Transformation for the bbox that contains the inset axes. If None, a transforms.IdentityTransform is used. The value of bbox_to_anchor (or the return value of its get_points method) is transformed by the bbox_transform and then interpreted as points in the pixel coordinate (which is dpi dependent). You may provide bbox_to_anchor in some normalized coordinate, and give an appropriate transform (e.g., parent_axes.transAxes).
axes_classmatplotlib.axes.Axes type, default: HostAxes
The type of the newly created inset axes.
axes_kwargsdict, optional
Keyword arguments to pass to the constructor of the inset axes. Valid arguments include:
Property Description
adjustable {'box', 'datalim'}
agg_filter a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array
alpha scalar or None
anchor (float, float) or {'C', 'SW', 'S', 'SE', 'E', 'NE', ...}
animated bool
aspect {'auto', 'equal'} or float
autoscale_on bool
autoscalex_on bool
autoscaley_on bool
axes_locator Callable[[Axes, Renderer], Bbox]
axisbelow bool or 'line'
box_aspect float or None
clip_box Bbox
clip_on bool
clip_path Patch or (Path, Transform) or None
facecolor or fc color
figure Figure
frame_on bool
gid str
in_layout bool
label object
navigate bool
navigate_mode unknown
path_effects AbstractPathEffect
picker None or bool or float or callable
position [left, bottom, width, height] or Bbox
prop_cycle unknown
rasterization_zorder float or None
rasterized bool
sketch_params (scale: float, length: float, randomness: float)
snap bool or None
title str
transform Transform
url str
visible bool
xbound unknown
xlabel str
xlim (bottom: float, top: float)
xmargin float greater than -0.5
xscale {"linear", "log", "symlog", "logit", ...} or ScaleBase
xticklabels unknown
xticks unknown
ybound unknown
ylabel str
ylim (bottom: float, top: float)
ymargin float greater than -0.5
yscale {"linear", "log", "symlog", "logit", ...} or ScaleBase
yticklabels unknown
yticks unknown
zorder float
borderpadfloat, default: 0.5
Padding between inset axes and the bbox_to_anchor. The units are axes font size, i.e. for a default font size of 10 points borderpad = 0.5 is equivalent to a padding of 5 points. Returns
inset_axesaxes_class
Inset axes object created. Notes The meaning of bbox_to_anchor and bbox_to_transform is interpreted differently from that of legend. The value of bbox_to_anchor (or the return value of its get_points method; the default is parent_axes.bbox) is transformed by the bbox_transform (the default is Identity transform) and then interpreted as points in the pixel coordinate (which is dpi dependent). Thus, following three calls are identical and creates an inset axes with respect to the parent_axes: axins = inset_axes(parent_axes, "30%", "40%")
axins = inset_axes(parent_axes, "30%", "40%",
bbox_to_anchor=parent_axes.bbox)
axins = inset_axes(parent_axes, "30%", "40%",
bbox_to_anchor=(0, 0, 1, 1),
bbox_transform=parent_axes.transAxes)
Examples using mpl_toolkits.axes_grid1.inset_locator.inset_axes
Adding a colorbar to inset axes
Controlling the position and size of colorbars with Inset Axes
Inset Locator Demo | matplotlib._as_gen.mpl_toolkits.axes_grid1.inset_locator.inset_axes |
mpl_toolkits.axes_grid1.inset_locator.InsetPosition classmpl_toolkits.axes_grid1.inset_locator.InsetPosition(parent, lbwh)[source]
Bases: object An object for positioning an inset axes. This is created by specifying the normalized coordinates in the axes, instead of the figure. Parameters
parentmatplotlib.axes.Axes
Axes to use for normalizing coordinates.
lbwhiterable of four floats
The left edge, bottom edge, width, and height of the inset axes, in units of the normalized coordinate of the parent axes. See also matplotlib.axes.Axes.set_axes_locator()
Examples The following bounds the inset axes to a box with 20% of the parent axes's height and 40% of the width. The size of the axes specified ([0, 0, 1, 1]) ensures that the axes completely fills the bounding box: >>> parent_axes = plt.gca()
>>> ax_ins = plt.axes([0, 0, 1, 1])
>>> ip = InsetPosition(ax, [0.5, 0.1, 0.4, 0.2])
>>> ax_ins.set_axes_locator(ip)
__call__(ax, renderer)[source]
Call self as a function. | matplotlib._as_gen.mpl_toolkits.axes_grid1.inset_locator.insetposition |
__call__(ax, renderer)[source]
Call self as a function. | matplotlib._as_gen.mpl_toolkits.axes_grid1.inset_locator.insetposition#mpl_toolkits.axes_grid1.inset_locator.InsetPosition.__call__ |
mpl_toolkits.axes_grid1.inset_locator.mark_inset mpl_toolkits.axes_grid1.inset_locator.mark_inset(parent_axes, inset_axes, loc1, loc2, **kwargs)[source]
Draw a box to mark the location of an area represented by an inset axes. This function draws a box in parent_axes at the bounding box of inset_axes, and shows a connection with the inset axes by drawing lines at the corners, giving a "zoomed in" effect. Parameters
parent_axesmatplotlib.axes.Axes
Axes which contains the area of the inset axes.
inset_axesmatplotlib.axes.Axes
The inset axes.
loc1, loc2{1, 2, 3, 4}
Corners to use for connecting the inset axes and the area in the parent axes. **kwargs
Patch properties for the lines and box drawn:
Property Description
agg_filter a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array
alpha unknown
animated bool
antialiased or aa bool or None
capstyle CapStyle or {'butt', 'projecting', 'round'}
clip_box Bbox
clip_on bool
clip_path Patch or (Path, Transform) or None
color color
edgecolor or ec color or None
facecolor or fc color or None
figure Figure
fill bool
gid str
hatch {'/', '\', '|', '-', '+', 'x', 'o', 'O', '.', '*'}
in_layout bool
joinstyle JoinStyle or {'miter', 'round', 'bevel'}
label object
linestyle or ls {'-', '--', '-.', ':', '', (offset, on-off-seq), ...}
linewidth or lw float or None
path_effects AbstractPathEffect
picker None or bool or float or callable
rasterized bool
sketch_params (scale: float, length: float, randomness: float)
snap bool or None
transform Transform
url str
visible bool
zorder float Returns
ppmatplotlib.patches.Patch
The patch drawn to represent the area of the inset axes.
p1, p2matplotlib.patches.Patch
The patches connecting two corners of the inset axes and its area.
Examples using mpl_toolkits.axes_grid1.inset_locator.mark_inset
Inset Locator Demo2 | matplotlib._as_gen.mpl_toolkits.axes_grid1.inset_locator.mark_inset |
mpl_toolkits.axes_grid1.inset_locator.zoomed_inset_axes mpl_toolkits.axes_grid1.inset_locator.zoomed_inset_axes(parent_axes, zoom, loc='upper right', bbox_to_anchor=None, bbox_transform=None, axes_class=None, axes_kwargs=None, borderpad=0.5)[source]
Create an anchored inset axes by scaling a parent axes. For usage, also see the examples. Parameters
parent_axesmatplotlib.axes.Axes
Axes to place the inset axes.
zoomfloat
Scaling factor of the data axes. zoom > 1 will enlarge the coordinates (i.e., "zoomed in"), while zoom < 1 will shrink the coordinates (i.e., "zoomed out").
locstr, default: 'upper right'
Location to place the inset axes. Valid locations are 'upper left', 'upper center', 'upper right', 'center left', 'center', 'center right', 'lower left', 'lower center, 'lower right'. For backward compatibility, numeric values are accepted as well. See the parameter loc of Legend for details.
bbox_to_anchortuple or matplotlib.transforms.BboxBase, optional
Bbox that the inset axes will be anchored to. If None, parent_axes.bbox is used. If a tuple, can be either [left, bottom, width, height], or [left, bottom]. If the kwargs width and/or height are specified in relative units, the 2-tuple [left, bottom] cannot be used. Note that the units of the bounding box are determined through the transform in use. When using bbox_to_anchor it almost always makes sense to also specify a bbox_transform. This might often be the axes transform parent_axes.transAxes.
bbox_transformmatplotlib.transforms.Transform, optional
Transformation for the bbox that contains the inset axes. If None, a transforms.IdentityTransform is used (i.e. pixel coordinates). This is useful when not providing any argument to bbox_to_anchor. When using bbox_to_anchor it almost always makes sense to also specify a bbox_transform. This might often be the axes transform parent_axes.transAxes. Inversely, when specifying the axes- or figure-transform here, be aware that not specifying bbox_to_anchor will use parent_axes.bbox, the units of which are in display (pixel) coordinates.
axes_classmatplotlib.axes.Axes type, default: HostAxes
The type of the newly created inset axes.
axes_kwargsdict, optional
Keyword arguments to pass to the constructor of the inset axes. Valid arguments include:
Property Description
adjustable {'box', 'datalim'}
agg_filter a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array
alpha scalar or None
anchor (float, float) or {'C', 'SW', 'S', 'SE', 'E', 'NE', ...}
animated bool
aspect {'auto', 'equal'} or float
autoscale_on bool
autoscalex_on bool
autoscaley_on bool
axes_locator Callable[[Axes, Renderer], Bbox]
axisbelow bool or 'line'
box_aspect float or None
clip_box Bbox
clip_on bool
clip_path Patch or (Path, Transform) or None
facecolor or fc color
figure Figure
frame_on bool
gid str
in_layout bool
label object
navigate bool
navigate_mode unknown
path_effects AbstractPathEffect
picker None or bool or float or callable
position [left, bottom, width, height] or Bbox
prop_cycle unknown
rasterization_zorder float or None
rasterized bool
sketch_params (scale: float, length: float, randomness: float)
snap bool or None
title str
transform Transform
url str
visible bool
xbound unknown
xlabel str
xlim (bottom: float, top: float)
xmargin float greater than -0.5
xscale {"linear", "log", "symlog", "logit", ...} or ScaleBase
xticklabels unknown
xticks unknown
ybound unknown
ylabel str
ylim (bottom: float, top: float)
ymargin float greater than -0.5
yscale {"linear", "log", "symlog", "logit", ...} or ScaleBase
yticklabels unknown
yticks unknown
zorder float
borderpadfloat, default: 0.5
Padding between inset axes and the bbox_to_anchor. The units are axes font size, i.e. for a default font size of 10 points borderpad = 0.5 is equivalent to a padding of 5 points. Returns
inset_axesaxes_class
Inset axes object created.
Examples using mpl_toolkits.axes_grid1.inset_locator.zoomed_inset_axes
Adding a colorbar to inset axes
Inset Locator Demo2 | matplotlib._as_gen.mpl_toolkits.axes_grid1.inset_locator.zoomed_inset_axes |
mpl_toolkits.axes_grid1.mpl_axes Classes
Axes(fig, rect, *[, facecolor, frameon, ...]) Build an Axes in a figure.
SimpleAxisArtist(axis, axisnum, spine)
SimpleChainedObjects(objects) | matplotlib._as_gen.mpl_toolkits.axes_grid1.mpl_axes |
mpl_toolkits.axes_grid1.mpl_axes.Axes classmpl_toolkits.axes_grid1.mpl_axes.Axes(fig, rect, *, facecolor=None, frameon=True, sharex=None, sharey=None, label='', xscale=None, yscale=None, box_aspect=None, **kwargs)[source]
Bases: matplotlib.axes._axes.Axes Build an Axes in a figure. Parameters
figFigure
The Axes is built in the Figure fig.
rect[left, bottom, width, height]
The Axes is built in the rectangle rect. rect is in Figure coordinates.
sharex, shareyAxes, optional
The x or y axis is shared with the x or y axis in the input Axes.
frameonbool, default: True
Whether the Axes frame is visible.
box_aspectfloat, optional
Set a fixed aspect for the Axes box, i.e. the ratio of height to width. See set_box_aspect for details. **kwargs
Other optional keyword arguments:
Property Description
adjustable {'box', 'datalim'}
agg_filter a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array
alpha scalar or None
anchor (float, float) or {'C', 'SW', 'S', 'SE', 'E', 'NE', ...}
animated bool
aspect {'auto', 'equal'} or float
autoscale_on bool
autoscalex_on bool
autoscaley_on bool
axes_locator Callable[[Axes, Renderer], Bbox]
axisbelow bool or 'line'
box_aspect float or None
clip_box Bbox
clip_on bool
clip_path Patch or (Path, Transform) or None
facecolor or fc color
figure Figure
frame_on bool
gid str
in_layout bool
label object
navigate bool
navigate_mode unknown
path_effects AbstractPathEffect
picker None or bool or float or callable
position [left, bottom, width, height] or Bbox
prop_cycle unknown
rasterization_zorder float or None
rasterized bool
sketch_params (scale: float, length: float, randomness: float)
snap bool or None
title str
transform Transform
url str
visible bool
xbound unknown
xlabel str
xlim (bottom: float, top: float)
xmargin float greater than -0.5
xscale {"linear", "log", "symlog", "logit", ...} or ScaleBase
xticklabels unknown
xticks unknown
ybound unknown
ylabel str
ylim (bottom: float, top: float)
ymargin float greater than -0.5
yscale {"linear", "log", "symlog", "logit", ...} or ScaleBase
yticklabels unknown
yticks unknown
zorder float Returns
Axes
The new Axes object. classAxisDict(axes)[source]
Bases: dict __call__(*v, **kwargs)[source]
Call self as a function.
propertyaxis
Convenience method to get or set some axis properties. Call signatures: xmin, xmax, ymin, ymax = axis()
xmin, xmax, ymin, ymax = axis([xmin, xmax, ymin, ymax])
xmin, xmax, ymin, ymax = axis(option)
xmin, xmax, ymin, ymax = axis(**kwargs)
Parameters
xmin, xmax, ymin, ymaxfloat, optional
The axis limits to be set. This can also be achieved using ax.set(xlim=(xmin, xmax), ylim=(ymin, ymax))
optionbool or str
If a bool, turns axis lines and labels on or off. If a string, possible values are:
Value Description
'on' Turn on axis lines and labels. Same as True.
'off' Turn off axis lines and labels. Same as False.
'equal' Set equal scaling (i.e., make circles circular) by changing axis limits. This is the same as ax.set_aspect('equal', adjustable='datalim'). Explicit data limits may not be respected in this case.
'scaled' Set equal scaling (i.e., make circles circular) by changing dimensions of the plot box. This is the same as ax.set_aspect('equal', adjustable='box', anchor='C'). Additionally, further autoscaling will be disabled.
'tight' Set limits just large enough to show all data, then disable further autoscaling.
'auto' Automatic scaling (fill plot box with data).
'image' 'scaled' with axis limits equal to data limits.
'square' Square plot; similar to 'scaled', but initially forcing xmax-xmin == ymax-ymin.
emitbool, default: True
Whether observers are notified of the axis limit change. This option is passed on to set_xlim and set_ylim. Returns
xmin, xmax, ymin, ymaxfloat
The axis limits. See also matplotlib.axes.Axes.set_xlim
matplotlib.axes.Axes.set_ylim
cla()[source]
Clear the Axes.
set(*, adjustable=<UNSET>, agg_filter=<UNSET>, alpha=<UNSET>, anchor=<UNSET>, animated=<UNSET>, aspect=<UNSET>, autoscale_on=<UNSET>, autoscalex_on=<UNSET>, autoscaley_on=<UNSET>, axes_locator=<UNSET>, axisbelow=<UNSET>, box_aspect=<UNSET>, clip_box=<UNSET>, clip_on=<UNSET>, clip_path=<UNSET>, facecolor=<UNSET>, frame_on=<UNSET>, gid=<UNSET>, in_layout=<UNSET>, label=<UNSET>, navigate=<UNSET>, path_effects=<UNSET>, picker=<UNSET>, position=<UNSET>, prop_cycle=<UNSET>, rasterization_zorder=<UNSET>, rasterized=<UNSET>, sketch_params=<UNSET>, snap=<UNSET>, title=<UNSET>, transform=<UNSET>, url=<UNSET>, visible=<UNSET>, xbound=<UNSET>, xlabel=<UNSET>, xlim=<UNSET>, xmargin=<UNSET>, xscale=<UNSET>, xticklabels=<UNSET>, xticks=<UNSET>, ybound=<UNSET>, ylabel=<UNSET>, ylim=<UNSET>, ymargin=<UNSET>, yscale=<UNSET>, yticklabels=<UNSET>, yticks=<UNSET>, zorder=<UNSET>)[source]
Set multiple properties at once. Supported properties are
Property Description
adjustable {'box', 'datalim'}
agg_filter a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array
alpha scalar or None
anchor (float, float) or {'C', 'SW', 'S', 'SE', 'E', 'NE', ...}
animated bool
aspect {'auto', 'equal'} or float
autoscale_on bool
autoscalex_on bool
autoscaley_on bool
axes_locator Callable[[Axes, Renderer], Bbox]
axisbelow bool or 'line'
box_aspect float or None
clip_box Bbox
clip_on bool
clip_path Patch or (Path, Transform) or None
facecolor or fc color
figure Figure
frame_on bool
gid str
in_layout bool
label object
navigate bool
navigate_mode unknown
path_effects AbstractPathEffect
picker None or bool or float or callable
position [left, bottom, width, height] or Bbox
prop_cycle unknown
rasterization_zorder float or None
rasterized bool
sketch_params (scale: float, length: float, randomness: float)
snap bool or None
title str
transform Transform
url str
visible bool
xbound unknown
xlabel str
xlim (bottom: float, top: float)
xmargin float greater than -0.5
xscale {"linear", "log", "symlog", "logit", ...} or ScaleBase
xticklabels unknown
xticks unknown
ybound unknown
ylabel str
ylim (bottom: float, top: float)
ymargin float greater than -0.5
yscale {"linear", "log", "symlog", "logit", ...} or ScaleBase
yticklabels unknown
yticks unknown
zorder float
Examples using mpl_toolkits.axes_grid1.mpl_axes.Axes
Axes Divider
Axes Grid2
Parasite Simple2
Simple ImageGrid
Simple ImageGrid 2
Tight Layout guide | matplotlib._as_gen.mpl_toolkits.axes_grid1.mpl_axes.axes |
classAxisDict(axes)[source]
Bases: dict __call__(*v, **kwargs)[source]
Call self as a function. | matplotlib._as_gen.mpl_toolkits.axes_grid1.mpl_axes.axes#mpl_toolkits.axes_grid1.mpl_axes.Axes.AxisDict |
__call__(*v, **kwargs)[source]
Call self as a function. | matplotlib._as_gen.mpl_toolkits.axes_grid1.mpl_axes.axes#mpl_toolkits.axes_grid1.mpl_axes.Axes.AxisDict.__call__ |
cla()[source]
Clear the Axes. | matplotlib._as_gen.mpl_toolkits.axes_grid1.mpl_axes.axes#mpl_toolkits.axes_grid1.mpl_axes.Axes.cla |
set(*, adjustable=<UNSET>, agg_filter=<UNSET>, alpha=<UNSET>, anchor=<UNSET>, animated=<UNSET>, aspect=<UNSET>, autoscale_on=<UNSET>, autoscalex_on=<UNSET>, autoscaley_on=<UNSET>, axes_locator=<UNSET>, axisbelow=<UNSET>, box_aspect=<UNSET>, clip_box=<UNSET>, clip_on=<UNSET>, clip_path=<UNSET>, facecolor=<UNSET>, frame_on=<UNSET>, gid=<UNSET>, in_layout=<UNSET>, label=<UNSET>, navigate=<UNSET>, path_effects=<UNSET>, picker=<UNSET>, position=<UNSET>, prop_cycle=<UNSET>, rasterization_zorder=<UNSET>, rasterized=<UNSET>, sketch_params=<UNSET>, snap=<UNSET>, title=<UNSET>, transform=<UNSET>, url=<UNSET>, visible=<UNSET>, xbound=<UNSET>, xlabel=<UNSET>, xlim=<UNSET>, xmargin=<UNSET>, xscale=<UNSET>, xticklabels=<UNSET>, xticks=<UNSET>, ybound=<UNSET>, ylabel=<UNSET>, ylim=<UNSET>, ymargin=<UNSET>, yscale=<UNSET>, yticklabels=<UNSET>, yticks=<UNSET>, zorder=<UNSET>)[source]
Set multiple properties at once. Supported properties are
Property Description
adjustable {'box', 'datalim'}
agg_filter a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array
alpha scalar or None
anchor (float, float) or {'C', 'SW', 'S', 'SE', 'E', 'NE', ...}
animated bool
aspect {'auto', 'equal'} or float
autoscale_on bool
autoscalex_on bool
autoscaley_on bool
axes_locator Callable[[Axes, Renderer], Bbox]
axisbelow bool or 'line'
box_aspect float or None
clip_box Bbox
clip_on bool
clip_path Patch or (Path, Transform) or None
facecolor or fc color
figure Figure
frame_on bool
gid str
in_layout bool
label object
navigate bool
navigate_mode unknown
path_effects AbstractPathEffect
picker None or bool or float or callable
position [left, bottom, width, height] or Bbox
prop_cycle unknown
rasterization_zorder float or None
rasterized bool
sketch_params (scale: float, length: float, randomness: float)
snap bool or None
title str
transform Transform
url str
visible bool
xbound unknown
xlabel str
xlim (bottom: float, top: float)
xmargin float greater than -0.5
xscale {"linear", "log", "symlog", "logit", ...} or ScaleBase
xticklabels unknown
xticks unknown
ybound unknown
ylabel str
ylim (bottom: float, top: float)
ymargin float greater than -0.5
yscale {"linear", "log", "symlog", "logit", ...} or ScaleBase
yticklabels unknown
yticks unknown
zorder float | matplotlib._as_gen.mpl_toolkits.axes_grid1.mpl_axes.axes#mpl_toolkits.axes_grid1.mpl_axes.Axes.set |
mpl_toolkits.axes_grid1.mpl_axes.SimpleAxisArtist classmpl_toolkits.axes_grid1.mpl_axes.SimpleAxisArtist(axis, axisnum, spine)[source]
Bases: matplotlib.artist.Artist propertylabel
propertymajor_ticklabels
propertymajor_ticks
set(*, agg_filter=<UNSET>, alpha=<UNSET>, animated=<UNSET>, clip_box=<UNSET>, clip_on=<UNSET>, clip_path=<UNSET>, gid=<UNSET>, in_layout=<UNSET>, label=<UNSET>, path_effects=<UNSET>, picker=<UNSET>, rasterized=<UNSET>, sketch_params=<UNSET>, snap=<UNSET>, transform=<UNSET>, url=<UNSET>, visible=<UNSET>, zorder=<UNSET>)[source]
Set multiple properties at once. Supported properties are
Property Description
agg_filter a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array
alpha scalar or None
animated bool
clip_box Bbox
clip_on bool
clip_path Patch or (Path, Transform) or None
figure Figure
gid str
in_layout bool
label unknown
path_effects AbstractPathEffect
picker None or bool or float or callable
rasterized bool
sketch_params (scale: float, length: float, randomness: float)
snap bool or None
transform Transform
url str
visible unknown
zorder float
set_label(txt)[source]
Set a label that will be displayed in the legend. Parameters
sobject
s will be converted to a string by calling str.
set_visible(b)[source]
Set the artist's visibility. Parameters
bbool
toggle(all=None, ticks=None, ticklabels=None, label=None)[source] | matplotlib._as_gen.mpl_toolkits.axes_grid1.mpl_axes.simpleaxisartist |
set(*, agg_filter=<UNSET>, alpha=<UNSET>, animated=<UNSET>, clip_box=<UNSET>, clip_on=<UNSET>, clip_path=<UNSET>, gid=<UNSET>, in_layout=<UNSET>, label=<UNSET>, path_effects=<UNSET>, picker=<UNSET>, rasterized=<UNSET>, sketch_params=<UNSET>, snap=<UNSET>, transform=<UNSET>, url=<UNSET>, visible=<UNSET>, zorder=<UNSET>)[source]
Set multiple properties at once. Supported properties are
Property Description
agg_filter a filter function, which takes a (m, n, 3) float array and a dpi value, and returns a (m, n, 3) array
alpha scalar or None
animated bool
clip_box Bbox
clip_on bool
clip_path Patch or (Path, Transform) or None
figure Figure
gid str
in_layout bool
label unknown
path_effects AbstractPathEffect
picker None or bool or float or callable
rasterized bool
sketch_params (scale: float, length: float, randomness: float)
snap bool or None
transform Transform
url str
visible unknown
zorder float | matplotlib._as_gen.mpl_toolkits.axes_grid1.mpl_axes.simpleaxisartist#mpl_toolkits.axes_grid1.mpl_axes.SimpleAxisArtist.set |
set_label(txt)[source]
Set a label that will be displayed in the legend. Parameters
sobject
s will be converted to a string by calling str. | matplotlib._as_gen.mpl_toolkits.axes_grid1.mpl_axes.simpleaxisartist#mpl_toolkits.axes_grid1.mpl_axes.SimpleAxisArtist.set_label |
set_visible(b)[source]
Set the artist's visibility. Parameters
bbool | matplotlib._as_gen.mpl_toolkits.axes_grid1.mpl_axes.simpleaxisartist#mpl_toolkits.axes_grid1.mpl_axes.SimpleAxisArtist.set_visible |
toggle(all=None, ticks=None, ticklabels=None, label=None)[source] | matplotlib._as_gen.mpl_toolkits.axes_grid1.mpl_axes.simpleaxisartist#mpl_toolkits.axes_grid1.mpl_axes.SimpleAxisArtist.toggle |
mpl_toolkits.axes_grid1.mpl_axes.SimpleChainedObjects classmpl_toolkits.axes_grid1.mpl_axes.SimpleChainedObjects(objects)[source]
Bases: object __call__(*args, **kwargs)[source]
Call self as a function. | matplotlib._as_gen.mpl_toolkits.axes_grid1.mpl_axes.simplechainedobjects |
__call__(*args, **kwargs)[source]
Call self as a function. | matplotlib._as_gen.mpl_toolkits.axes_grid1.mpl_axes.simplechainedobjects#mpl_toolkits.axes_grid1.mpl_axes.SimpleChainedObjects.__call__ |
mpl_toolkits.axes_grid1.parasite_axes Classes
HostAxes alias of mpl_toolkits.axes_grid1.parasite_axes.AxesHostAxes
HostAxesBase(*args, **kwargs)
ParasiteAxes alias of mpl_toolkits.axes_grid1.parasite_axes.AxesParasite
ParasiteAxesAuxTrans alias of mpl_toolkits.axes_grid1.parasite_axes.AxesParasiteParasiteAuxTrans
ParasiteAxesAuxTransBase(parent_axes, ...[, ...]) [Deprecated]
ParasiteAxesBase(parent_axes[, ...]) Functions
host_axes(*args[, axes_class, figure]) Create axes that can act as a hosts to parasitic axes.
host_axes_class_factory(axes_class)
host_subplot(*args[, axes_class, figure]) Create a subplot that can act as a host to parasitic axes.
host_subplot_class_factory(axes_class)
parasite_axes_auxtrans_class_factory(axes_class) [Deprecated]
parasite_axes_class_factory(axes_class) | matplotlib._as_gen.mpl_toolkits.axes_grid1.parasite_axes |
mpl_toolkits.axes_grid1.parasite_axes.host_axes mpl_toolkits.axes_grid1.parasite_axes.host_axes(*args, axes_class=<class 'mpl_toolkits.axes_grid1.mpl_axes.Axes'>, figure=None, **kwargs)[source]
Create axes that can act as a hosts to parasitic axes. Parameters
figurematplotlib.figure.Figure
Figure to which the axes will be added. Defaults to the current figure pyplot.gcf(). *args, **kwargs
Will be passed on to the underlying Axes object creation. | matplotlib._as_gen.mpl_toolkits.axes_grid1.parasite_axes.host_axes |
mpl_toolkits.axes_grid1.parasite_axes.host_axes_class_factory mpl_toolkits.axes_grid1.parasite_axes.host_axes_class_factory(axes_class)[source] | matplotlib._as_gen.mpl_toolkits.axes_grid1.parasite_axes.host_axes_class_factory |
mpl_toolkits.axes_grid1.parasite_axes.host_subplot mpl_toolkits.axes_grid1.parasite_axes.host_subplot(*args, axes_class=<class 'mpl_toolkits.axes_grid1.mpl_axes.Axes'>, figure=None, **kwargs)[source]
Create a subplot that can act as a host to parasitic axes. Parameters
figurematplotlib.figure.Figure
Figure to which the subplot will be added. Defaults to the current figure pyplot.gcf(). *args, **kwargs
Will be passed on to the underlying Axes object creation. | matplotlib._as_gen.mpl_toolkits.axes_grid1.parasite_axes.host_subplot |
mpl_toolkits.axes_grid1.parasite_axes.host_subplot_class_factory mpl_toolkits.axes_grid1.parasite_axes.host_subplot_class_factory(axes_class)[source] | matplotlib._as_gen.mpl_toolkits.axes_grid1.parasite_axes.host_subplot_class_factory |
mpl_toolkits.axes_grid1.parasite_axes.HostAxes mpl_toolkits.axes_grid1.parasite_axes.HostAxes[source]
alias of mpl_toolkits.axes_grid1.parasite_axes.AxesHostAxes | matplotlib._as_gen.mpl_toolkits.axes_grid1.parasite_axes.hostaxes |
mpl_toolkits.axes_grid1.parasite_axes.HostAxesBase classmpl_toolkits.axes_grid1.parasite_axes.HostAxesBase(*args, **kwargs)[source]
Bases: object cla()[source]
draw(renderer)[source]
get_aux_axes(tr=None, viewlim_mode='equal', axes_class=<class 'mpl_toolkits.axes_grid1.mpl_axes.Axes'>)[source]
Add a parasite axes to this host. Despite this method's name, this should actually be thought of as an add_parasite_axes method. tr may be Transform, in which case the following relation will hold: parasite.transData = tr + host.transData. Alternatively, it may be None (the default), no special relationship will hold between the parasite's and the host's transData.
get_tightbbox(renderer, call_axes_locator=True, bbox_extra_artists=None)[source]
pick(mouseevent)[source]
twin(aux_trans=None, axes_class=None)[source]
Create a twin of Axes with no shared axis. While self will have ticks on the left and bottom axis, the returned axes will have ticks on the top and right axis.
twinx(axes_class=None)[source]
Create a twin of Axes with a shared x-axis but independent y-axis. The y-axis of self will have ticks on the left and the returned axes will have ticks on the right.
twiny(axes_class=None)[source]
Create a twin of Axes with a shared y-axis but independent x-axis. The x-axis of self will have ticks on the bottom and the returned axes will have ticks on the top.
Examples using mpl_toolkits.axes_grid1.parasite_axes.HostAxesBase
Parasite Simple2
Curvilinear grid demo
mpl_toolkits.axisartist.floating_axes features
floating_axis demo
Parasite Axes demo | matplotlib._as_gen.mpl_toolkits.axes_grid1.parasite_axes.hostaxesbase |
cla()[source] | matplotlib._as_gen.mpl_toolkits.axes_grid1.parasite_axes.hostaxesbase#mpl_toolkits.axes_grid1.parasite_axes.HostAxesBase.cla |
draw(renderer)[source] | matplotlib._as_gen.mpl_toolkits.axes_grid1.parasite_axes.hostaxesbase#mpl_toolkits.axes_grid1.parasite_axes.HostAxesBase.draw |
get_aux_axes(tr=None, viewlim_mode='equal', axes_class=<class 'mpl_toolkits.axes_grid1.mpl_axes.Axes'>)[source]
Add a parasite axes to this host. Despite this method's name, this should actually be thought of as an add_parasite_axes method. tr may be Transform, in which case the following relation will hold: parasite.transData = tr + host.transData. Alternatively, it may be None (the default), no special relationship will hold between the parasite's and the host's transData. | matplotlib._as_gen.mpl_toolkits.axes_grid1.parasite_axes.hostaxesbase#mpl_toolkits.axes_grid1.parasite_axes.HostAxesBase.get_aux_axes |
get_tightbbox(renderer, call_axes_locator=True, bbox_extra_artists=None)[source] | matplotlib._as_gen.mpl_toolkits.axes_grid1.parasite_axes.hostaxesbase#mpl_toolkits.axes_grid1.parasite_axes.HostAxesBase.get_tightbbox |
pick(mouseevent)[source] | matplotlib._as_gen.mpl_toolkits.axes_grid1.parasite_axes.hostaxesbase#mpl_toolkits.axes_grid1.parasite_axes.HostAxesBase.pick |
twin(aux_trans=None, axes_class=None)[source]
Create a twin of Axes with no shared axis. While self will have ticks on the left and bottom axis, the returned axes will have ticks on the top and right axis. | matplotlib._as_gen.mpl_toolkits.axes_grid1.parasite_axes.hostaxesbase#mpl_toolkits.axes_grid1.parasite_axes.HostAxesBase.twin |
twinx(axes_class=None)[source]
Create a twin of Axes with a shared x-axis but independent y-axis. The y-axis of self will have ticks on the left and the returned axes will have ticks on the right. | matplotlib._as_gen.mpl_toolkits.axes_grid1.parasite_axes.hostaxesbase#mpl_toolkits.axes_grid1.parasite_axes.HostAxesBase.twinx |
twiny(axes_class=None)[source]
Create a twin of Axes with a shared y-axis but independent x-axis. The x-axis of self will have ticks on the bottom and the returned axes will have ticks on the top. | matplotlib._as_gen.mpl_toolkits.axes_grid1.parasite_axes.hostaxesbase#mpl_toolkits.axes_grid1.parasite_axes.HostAxesBase.twiny |
mpl_toolkits.axes_grid1.parasite_axes.parasite_axes_auxtrans_class_factory mpl_toolkits.axes_grid1.parasite_axes.parasite_axes_auxtrans_class_factory(axes_class)[source]
[Deprecated] Notes Deprecated since version 3.4: | matplotlib._as_gen.mpl_toolkits.axes_grid1.parasite_axes.parasite_axes_auxtrans_class_factory |
mpl_toolkits.axes_grid1.parasite_axes.parasite_axes_class_factory mpl_toolkits.axes_grid1.parasite_axes.parasite_axes_class_factory(axes_class)[source] | matplotlib._as_gen.mpl_toolkits.axes_grid1.parasite_axes.parasite_axes_class_factory |
mpl_toolkits.axes_grid1.parasite_axes.ParasiteAxes mpl_toolkits.axes_grid1.parasite_axes.ParasiteAxes[source]
alias of mpl_toolkits.axes_grid1.parasite_axes.AxesParasite | matplotlib._as_gen.mpl_toolkits.axes_grid1.parasite_axes.parasiteaxes |
mpl_toolkits.axes_grid1.parasite_axes.ParasiteAxesAuxTrans mpl_toolkits.axes_grid1.parasite_axes.ParasiteAxesAuxTrans[source]
alias of mpl_toolkits.axes_grid1.parasite_axes.AxesParasiteParasiteAuxTrans | matplotlib._as_gen.mpl_toolkits.axes_grid1.parasite_axes.parasiteaxesauxtrans |
mpl_toolkits.axes_grid1.parasite_axes.ParasiteAxesAuxTransBase classmpl_toolkits.axes_grid1.parasite_axes.ParasiteAxesAuxTransBase(parent_axes, aux_transform, viewlim_mode=None, **kwargs)[source]
Bases: object [Deprecated] Notes Deprecated since version 3.4: apply_aspect(position=None)[source]
get_viewlim_mode()[source]
set_viewlim_mode(mode)[source]
update_viewlim()[source]
[Deprecated] Notes Deprecated since version 3.4: | matplotlib._as_gen.mpl_toolkits.axes_grid1.parasite_axes.parasiteaxesauxtransbase |
apply_aspect(position=None)[source] | matplotlib._as_gen.mpl_toolkits.axes_grid1.parasite_axes.parasiteaxesauxtransbase#mpl_toolkits.axes_grid1.parasite_axes.ParasiteAxesAuxTransBase.apply_aspect |
get_viewlim_mode()[source] | matplotlib._as_gen.mpl_toolkits.axes_grid1.parasite_axes.parasiteaxesauxtransbase#mpl_toolkits.axes_grid1.parasite_axes.ParasiteAxesAuxTransBase.get_viewlim_mode |
set_viewlim_mode(mode)[source] | matplotlib._as_gen.mpl_toolkits.axes_grid1.parasite_axes.parasiteaxesauxtransbase#mpl_toolkits.axes_grid1.parasite_axes.ParasiteAxesAuxTransBase.set_viewlim_mode |
update_viewlim()[source]
[Deprecated] Notes Deprecated since version 3.4: | matplotlib._as_gen.mpl_toolkits.axes_grid1.parasite_axes.parasiteaxesauxtransbase#mpl_toolkits.axes_grid1.parasite_axes.ParasiteAxesAuxTransBase.update_viewlim |
mpl_toolkits.axes_grid1.parasite_axes.ParasiteAxesBase classmpl_toolkits.axes_grid1.parasite_axes.ParasiteAxesBase(parent_axes, aux_transform=None, *, viewlim_mode=None, **kwargs)[source]
Bases: object apply_aspect(position=None)[source]
cla()[source]
get_images_artists()[source]
[Deprecated] Notes Deprecated since version 3.5:
get_viewlim_mode()[source]
pick(mouseevent)[source]
set_viewlim_mode(mode)[source]
update_viewlim()[source]
[Deprecated] Notes Deprecated since version 3.4:
Examples using mpl_toolkits.axes_grid1.parasite_axes.ParasiteAxesBase
Parasite Axes demo | matplotlib._as_gen.mpl_toolkits.axes_grid1.parasite_axes.parasiteaxesbase |
apply_aspect(position=None)[source] | matplotlib._as_gen.mpl_toolkits.axes_grid1.parasite_axes.parasiteaxesbase#mpl_toolkits.axes_grid1.parasite_axes.ParasiteAxesBase.apply_aspect |
cla()[source] | matplotlib._as_gen.mpl_toolkits.axes_grid1.parasite_axes.parasiteaxesbase#mpl_toolkits.axes_grid1.parasite_axes.ParasiteAxesBase.cla |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.