mpl_toolkits.axes_grid1.anchored_artists.AnchoredDirectionArrows   classmpl_toolkits.axes_grid1.anchored_artists.AnchoredDirectionArrows(transform, label_x, label_y, length=0.15, fontsize=0.08, loc='upper left', angle=0, aspect_ratio=1, pad=0.4, borderpad=0.4, frameon=False, color='w', alpha=1, sep_x=0.01, sep_y=0, fontproperties=None, back_length=0.15, head_width=10, head_length=15, tail_width=2, text_props=None, arrow_props=None, **kwargs)[source]

Bases: matplotlib.offsetbox.AnchoredOffsetbox Draw two perpendicular arrows to indicate directions.  Parameters

transformmatplotlib.transforms.Transform

The transformation object for the coordinate system in use, i.e., matplotlib.axes.Axes.transAxes.
label_x, label_ystr

Label text for the x and y arrows
lengthfloat, default: 0.15

Length of the arrow, given in coordinates of transform.
fontsizefloat, default: 0.08

Size of label strings, given in coordinates of transform.
locstr, default: 'upper left'

Location of this ellipse. 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.
anglefloat, default: 0

The angle of the arrows in degrees.
aspect_ratiofloat, default: 1

The ratio of the length of arrow_x and arrow_y. Negative numbers can be used to change the direction.
padfloat, default: 0.4

Padding around the labels and arrows, in fraction of the font size.
borderpadfloat, default: 0.4

Border padding, in fraction of the font size.
frameonbool, default: False

If True, draw a box around the arrows and labels.
colorstr, default: 'white'

Color for the arrows and labels.
alphafloat, default: 1

Alpha values of the arrows and labels
sep_x, sep_yfloat, default: 0.01 and 0 respectively

Separation between the arrows and labels in coordinates of transform.
fontpropertiesmatplotlib.font_manager.FontProperties, optional

Font properties for the label text.
back_lengthfloat, default: 0.15

Fraction of the arrow behind the arrow crossing.
head_widthfloat, default: 10

Width of arrow head, sent to ArrowStyle.
head_lengthfloat, default: 15

Length of arrow head, sent to ArrowStyle.
tail_widthfloat, default: 2

Width of arrow tail, sent to ArrowStyle.
text_props, arrow_propsdict

Properties of the text and arrows, passed to textpath.TextPath and patches.FancyArrowPatch.  **kwargs

Keyword arguments forwarded to AnchoredOffsetbox.     Notes If prop is passed as a keyword argument, but fontproperties is not, then prop is be assumed to be the intended fontproperties. Using both prop and fontproperties is not supported. Examples >>> import matplotlib.pyplot as plt
>>> import numpy as np
>>> from mpl_toolkits.axes_grid1.anchored_artists import (
...     AnchoredDirectionArrows)
>>> fig, ax = plt.subplots()
>>> ax.imshow(np.random.random((10, 10)))
>>> arrows = AnchoredDirectionArrows(ax.transAxes, '111', '110')
>>> ax.add_artist(arrows)
>>> fig.show()
 Using several of the optional parameters, creating downward pointing arrow and high contrast text labels. >>> import matplotlib.font_manager as fm
>>> fontprops = fm.FontProperties(family='monospace')
>>> arrows = AnchoredDirectionArrows(ax.transAxes, 'East', 'South',
...                                  loc='lower left', color='k',
...                                  aspect_ratio=-1, sep_x=0.02,
...                                  sep_y=-0.01,
...                                  text_props={'ec':'w', 'fc':'k'},
...                                  fontproperties=fontprops)
  Attributes

arrow_x, arrow_ymatplotlib.patches.FancyArrowPatch

Arrow x and y
text_path_x, text_path_ymatplotlib.textpath.TextPath

Path for arrow labels
p_x, p_ymatplotlib.patches.PathPatch

Patch for arrow labels
boxmatplotlib.offsetbox.AuxTransformBox

Container for the arrows and labels.       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

  Examples using mpl_toolkits.axes_grid1.anchored_artists.AnchoredDirectionArrows

   Anchored Direction Arrow


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


mpl_toolkits.axes_grid1.anchored_artists.AnchoredDrawingArea   classmpl_toolkits.axes_grid1.anchored_artists.AnchoredDrawingArea(width, height, xdescent, ydescent, loc, pad=0.4, borderpad=0.5, prop=None, frameon=True, **kwargs)[source]

Bases: matplotlib.offsetbox.AnchoredOffsetbox An anchored container with a fixed size and fillable DrawingArea. Artists added to the drawing_area will have their coordinates interpreted as pixels. Any transformations set on the artists will be overridden.  Parameters

width, heightfloat

width and height of the container, in pixels.
xdescent, ydescentfloat

descent of the container in the x- and y- direction, in pixels.
locstr

Location of this artist. 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 objects, in fraction of the font size.
borderpadfloat, default: 0.5

Border padding, in fraction of the font size.
propmatplotlib.font_manager.FontProperties, optional

Font property used as a reference for paddings.
frameonbool, default: True

If True, draw a box around this artists.  **kwargs

Keyword arguments forwarded to AnchoredOffsetbox.     Examples To display blue and red circles of different sizes in the upper right of an axes ax: >>> ada = AnchoredDrawingArea(20, 20, 0, 0,
...                           loc='upper right', frameon=False)
>>> ada.drawing_area.add_artist(Circle((10, 10), 10, fc="b"))
>>> ada.drawing_area.add_artist(Circle((30, 10), 5, fc="r"))
>>> ax.add_artist(ada)
  Attributes

drawing_areamatplotlib.offsetbox.DrawingArea

A container for artists to display.       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

  Examples using mpl_toolkits.axes_grid1.anchored_artists.AnchoredDrawingArea

   Simple Anchored Artists

   Annotations


mpl_toolkits.axes_grid1.anchored_artists.AnchoredEllipse   classmpl_toolkits.axes_grid1.anchored_artists.AnchoredEllipse(transform, width, height, angle, loc, pad=0.1, borderpad=0.1, prop=None, frameon=True, **kwargs)[source]

Bases: matplotlib.offsetbox.AnchoredOffsetbox Draw an anchored ellipse of a given size.  Parameters

transformmatplotlib.transforms.Transform

The transformation object for the coordinate system in use, i.e., matplotlib.axes.Axes.transData.
width, heightfloat

Width and height of the ellipse, given in coordinates of transform.
anglefloat

Rotation of the ellipse, in degrees, anti-clockwise.
locstr

Location of this ellipse. 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.1

Padding around the ellipse, in fraction of the font size.
borderpadfloat, default: 0.1

Border padding, in fraction of the font size.
frameonbool, default: True

If True, draw a box around the ellipse.
propmatplotlib.font_manager.FontProperties, optional

Font property used as a reference for paddings.  **kwargs

Keyword arguments forwarded to AnchoredOffsetbox.    Attributes

ellipsematplotlib.patches.Ellipse

Ellipse patch drawn.       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

  Examples using mpl_toolkits.axes_grid1.anchored_artists.AnchoredEllipse

   Simple Anchored Artists


mpl_toolkits.axes_grid1.anchored_artists.AnchoredSizeBar   classmpl_toolkits.axes_grid1.anchored_artists.AnchoredSizeBar(transform, size, label, loc, pad=0.1, borderpad=0.1, sep=2, frameon=True, size_vertical=0, color='black', label_top=False, fontproperties=None, fill_bar=None, **kwargs)[source]

Bases: matplotlib.offsetbox.AnchoredOffsetbox Draw a horizontal scale bar with a center-aligned label underneath.  Parameters

transformmatplotlib.transforms.Transform

The transformation object for the coordinate system in use, i.e., matplotlib.axes.Axes.transData.
sizefloat

Horizontal length of the size bar, given in coordinates of transform.
labelstr

Label to display.
locstr

Location of this ellipse. 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.1

Padding around the label and size bar, in fraction of the font size.
borderpadfloat, default: 0.1

Border padding, in fraction of the font size.
sepfloat, default: 2

Separation between the label and the size bar, in points.
frameonbool, default: True

If True, draw a box around the horizontal bar and label.
size_verticalfloat, default: 0

Vertical length of the size bar, given in coordinates of transform.
colorstr, default: 'black'

Color for the size bar and label.
label_topbool, default: False

If True, the label will be over the size bar.
fontpropertiesmatplotlib.font_manager.FontProperties, optional

Font properties for the label text.
fill_barbool, optional

If True and if size_vertical is nonzero, the size bar will be filled in with the color specified by the size bar. Defaults to True if size_vertical is greater than zero and False otherwise.  **kwargs

Keyword arguments forwarded to AnchoredOffsetbox.     Notes If prop is passed as a keyword argument, but fontproperties is not, then prop is be assumed to be the intended fontproperties. Using both prop and fontproperties is not supported. Examples >>> import matplotlib.pyplot as plt
>>> import numpy as np
>>> from mpl_toolkits.axes_grid1.anchored_artists import (
...     AnchoredSizeBar)
>>> fig, ax = plt.subplots()
>>> ax.imshow(np.random.random((10, 10)))
>>> bar = AnchoredSizeBar(ax.transData, 3, '3 data units', 4)
>>> ax.add_artist(bar)
>>> fig.show()
 Using all the optional parameters >>> import matplotlib.font_manager as fm
>>> fontprops = fm.FontProperties(size=14, family='monospace')
>>> bar = AnchoredSizeBar(ax.transData, 3, '3 units', 4, pad=0.5,
...                       sep=5, borderpad=0.5, frameon=False,
...                       size_vertical=0.5, color='white',
...                       fontproperties=fontprops)
  Attributes

size_barmatplotlib.offsetbox.AuxTransformBox

Container for the size bar.
txt_labelmatplotlib.offsetbox.TextArea

Container for the label of the size bar.       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

  Examples using mpl_toolkits.axes_grid1.anchored_artists.AnchoredSizeBar

   Inset Locator Demo2

   Simple Anchored Artists


mpl_toolkits.axes_grid1.axes_divider Helper classes to adjust the positions of multiple axes at drawing time.  Classes
AxesDivider(axes[, xref, yref]) Divider based on the pre-existing axes.
AxesLocator(axes_divider, nx, ny[, nx1, ny1]) A callable object which returns the position and size of a given AxesDivider cell.
Divider(fig, pos, horizontal, vertical[, ...]) An Axes positioning class.
HBoxDivider(fig, *args[, horizontal, ...]) A SubplotDivider for laying out axes horizontally, while ensuring that they have equal heights.
SubplotDivider(fig, *args[, horizontal, ...]) The Divider class whose rectangle area is specified as a subplot geometry.
VBoxDivider(fig, *args[, horizontal, ...]) A SubplotDivider for laying out axes vertically, while ensuring that they have equal widths.     Functions
make_axes_area_auto_adjustable(ax[, ...])
make_axes_locatable(axes)


mpl_toolkits.axes_grid1.axes_divider.AxesDivider   classmpl_toolkits.axes_grid1.axes_divider.AxesDivider(axes, xref=None, yref=None)[source]

Bases: mpl_toolkits.axes_grid1.axes_divider.Divider Divider based on the pre-existing axes.  Parameters

axesAxes

xref
yref
     append_axes(position, size, pad=None, add_to_figure=<deprecated parameter>, **kwargs)[source]

Create an axes at the given position with the same height (or width) of the main axes.  position

["left"|"right"|"bottom"|"top"]   size and pad should be axes_grid.axes_size compatible.
   get_anchor()[source]

Return the anchor.
   get_aspect()[source]

Return aspect.
   get_position()[source]

Return the position of the rectangle.
   get_subplotspec()[source]

   new_horizontal(size, pad=None, pack_start=False, **kwargs)[source]

Add a new axes on the right (or left) side of the main axes.  Parameters

sizeaxes_size or float or str

The axes width. float or str arguments are interpreted as axes_size.from_any(size, AxesX(<main_axes>)).
padaxes_size or float or str

Padding between the axes. float or str arguments are interpreted as axes_size.from_any(size, AxesX(<main_axes>)). Defaults to rcParams["figure.subplot.wspace"] (default: 0.2) times the main axes width.
pack_startbool

If False, the new axes is appended at the end of the list, i.e., it became the right-most axes. If True, it is inserted at the start of the list, and becomes the left-most axes.  **kwargs

All extra keywords arguments are passed to the created axes. If axes_class is given, the new axes will be created as an instance of the given class. Otherwise, the same class of the main axes will be used.
   new_vertical(size, pad=None, pack_start=False, **kwargs)[source]

Add a new axes on the top (or bottom) side of the main axes.  Parameters

sizeaxes_size or float or str

The axes height. float or str arguments are interpreted as axes_size.from_any(size, AxesY(<main_axes>)).
padaxes_size or float or str

Padding between the axes. float or str arguments are interpreted as axes_size.from_any(size, AxesY(<main_axes>)). Defaults to rcParams["figure.subplot.hspace"] (default: 0.2) times the main axes height.
pack_startbool

If False, the new axes is appended at the end of the list, i.e., it became the right-most axes. If True, it is inserted at the start of the list, and becomes the left-most axes.  **kwargs

All extra keywords arguments are passed to the created axes. If axes_class is given, the new axes will be created as an instance of the given class. Otherwise, the same class of the main axes will be used.

  Examples using mpl_toolkits.axes_grid1.axes_divider.AxesDivider

   Colorbar with AxesDivider

   Make Room For Ylabel Using Axesgrid

   Scatter Histogram (Locatable Axes)

   Simple Colorbar

   Tight Layout guide


append_axes(position, size, pad=None, add_to_figure=<deprecated parameter>, **kwargs)[source]

Create an axes at the given position with the same height (or width) of the main axes.  position

["left"|"right"|"bottom"|"top"]   size and pad should be axes_grid.axes_size compatible.


get_anchor()[source]

Return the anchor.


get_position()[source]

Return the position of the rectangle.


new_horizontal(size, pad=None, pack_start=False, **kwargs)[source]

Add a new axes on the right (or left) side of the main axes.  Parameters

sizeaxes_size or float or str

The axes width. float or str arguments are interpreted as axes_size.from_any(size, AxesX(<main_axes>)).
padaxes_size or float or str

Padding between the axes. float or str arguments are interpreted as axes_size.from_any(size, AxesX(<main_axes>)). Defaults to rcParams["figure.subplot.wspace"] (default: 0.2) times the main axes width.
pack_startbool

If False, the new axes is appended at the end of the list, i.e., it became the right-most axes. If True, it is inserted at the start of the list, and becomes the left-most axes.  **kwargs

All extra keywords arguments are passed to the created axes. If axes_class is given, the new axes will be created as an instance of the given class. Otherwise, the same class of the main axes will be used.


new_vertical(size, pad=None, pack_start=False, **kwargs)[source]

Add a new axes on the top (or bottom) side of the main axes.  Parameters

sizeaxes_size or float or str

The axes height. float or str arguments are interpreted as axes_size.from_any(size, AxesY(<main_axes>)).
padaxes_size or float or str

Padding between the axes. float or str arguments are interpreted as axes_size.from_any(size, AxesY(<main_axes>)). Defaults to rcParams["figure.subplot.hspace"] (default: 0.2) times the main axes height.
pack_startbool

If False, the new axes is appended at the end of the list, i.e., it became the right-most axes. If True, it is inserted at the start of the list, and becomes the left-most axes.  **kwargs

All extra keywords arguments are passed to the created axes. If axes_class is given, the new axes will be created as an instance of the given class. Otherwise, the same class of the main axes will be used.


mpl_toolkits.axes_grid1.axes_divider.AxesLocator   classmpl_toolkits.axes_grid1.axes_divider.AxesLocator(axes_divider, nx, ny, nx1=None, ny1=None)[source]

Bases: object A callable object which returns the position and size of a given AxesDivider cell.  Parameters

axes_dividerAxesDivider

nx, nx1int

Integers specifying the column-position of the cell. When nx1 is None, a single nx-th column is specified. Otherwise location of columns spanning between nx to nx1 (but excluding nx1-th column) is specified.
ny, ny1int

Same as nx and nx1, but for row positions.       __call__(axes, renderer)[source]

Call self as a function.
   get_subplotspec()[source]


__call__(axes, renderer)[source]

Call self as a function.


mpl_toolkits.axes_grid1.axes_divider.Divider   classmpl_toolkits.axes_grid1.axes_divider.Divider(fig, pos, horizontal, vertical, aspect=None, anchor='C')[source]

Bases: object An Axes positioning class. The divider is initialized with lists of horizontal and vertical sizes (mpl_toolkits.axes_grid1.axes_size) based on which a given rectangular area will be divided. The new_locator method then creates a callable object that can be used as the axes_locator of the axes.  Parameters

figFigure

postuple of 4 floats

Position of the rectangle that will be divided.
horizontallist of axes_size

Sizes for horizontal division.
verticallist of axes_size

Sizes for vertical division.
aspectbool

Whether overall rectangular area is reduced so that the relative part of the horizontal and vertical scales have the same scale.
anchor{'C', 'SW', 'S', 'SE', 'E', 'NE', 'N', 'NW', 'W'}

Placement of the reduced rectangle, when aspect is True.       add_auto_adjustable_area(use_axes, pad=0.1, adjust_dirs=None)[source]

   append_size(position, size)[source]

   get_anchor()[source]

Return the anchor.
   get_aspect()[source]

Return aspect.
   get_horizontal()[source]

Return horizontal sizes.
   get_horizontal_sizes(renderer)[source]

   get_locator()[source]

   get_position()[source]

Return the position of the rectangle.
   get_position_runtime(ax, renderer)[source]

   get_vertical()[source]

Return vertical sizes.
   get_vertical_sizes(renderer)[source]

   get_vsize_hsize()[source]

[Deprecated] Notes  Deprecated since version 3.5:
   locate(nx, ny, nx1=None, ny1=None, axes=None, renderer=None)[source]

 Parameters

nx, nx1int

Integers specifying the column-position of the cell. When nx1 is None, a single nx-th column is specified. Otherwise location of columns spanning between nx to nx1 (but excluding nx1-th column) is specified.
ny, ny1int

Same as nx and nx1, but for row positions.  axes
renderer

   new_locator(nx, ny, nx1=None, ny1=None)[source]

Return a new AxesLocator for the specified cell.  Parameters

nx, nx1int

Integers specifying the column-position of the cell. When nx1 is None, a single nx-th column is specified. Otherwise location of columns spanning between nx to nx1 (but excluding nx1-th column) is specified.
ny, ny1int

Same as nx and nx1, but for row positions.
   set_anchor(anchor)[source]

 Parameters

anchor(float, float) or {'C', 'SW', 'S', 'SE', 'E', 'NE', ...}

Either an (x, y) pair of relative coordinates (0 is left or bottom, 1 is right or top), 'C' (center), or a cardinal direction ('SW', southwest, is bottom left, etc.).      See also  Axes.set_anchor

   set_aspect(aspect=False)[source]

 Parameters

aspectbool

   set_horizontal(h)[source]

 Parameters

hlist of axes_size

sizes for horizontal division
   set_locator(_locator)[source]

   set_position(pos)[source]

Set the position of the rectangle.  Parameters

postuple of 4 floats

position of the rectangle that will be divided
   set_vertical(v)[source]

 Parameters

vlist of axes_size

sizes for vertical division


get_horizontal()[source]

Return horizontal sizes.


get_vertical()[source]

Return vertical sizes.


get_vsize_hsize()[source]

[Deprecated] Notes  Deprecated since version 3.5:


locate(nx, ny, nx1=None, ny1=None, axes=None, renderer=None)[source]

 Parameters

nx, nx1int

Integers specifying the column-position of the cell. When nx1 is None, a single nx-th column is specified. Otherwise location of columns spanning between nx to nx1 (but excluding nx1-th column) is specified.
ny, ny1int

Same as nx and nx1, but for row positions.  axes
renderer


new_locator(nx, ny, nx1=None, ny1=None)[source]

Return a new AxesLocator for the specified cell.  Parameters

nx, nx1int

Integers specifying the column-position of the cell. When nx1 is None, a single nx-th column is specified. Otherwise location of columns spanning between nx to nx1 (but excluding nx1-th column) is specified.
ny, ny1int

Same as nx and nx1, but for row positions.


set_anchor(anchor)[source]

 Parameters

anchor(float, float) or {'C', 'SW', 'S', 'SE', 'E', 'NE', ...}

Either an (x, y) pair of relative coordinates (0 is left or bottom, 1 is right or top), 'C' (center), or a cardinal direction ('SW', southwest, is bottom left, etc.).      See also  Axes.set_anchor


set_aspect(aspect=False)[source]

 Parameters

aspectbool


set_horizontal(h)[source]

 Parameters

hlist of axes_size

sizes for horizontal division


set_position(pos)[source]

Set the position of the rectangle.  Parameters

postuple of 4 floats

position of the rectangle that will be divided


set_vertical(v)[source]

 Parameters

vlist of axes_size

sizes for vertical division


mpl_toolkits.axes_grid1.axes_divider.HBoxDivider   classmpl_toolkits.axes_grid1.axes_divider.HBoxDivider(fig, *args, horizontal=None, vertical=None, aspect=None, anchor='C')[source]

Bases: mpl_toolkits.axes_grid1.axes_divider.SubplotDivider A SubplotDivider for laying out axes horizontally, while ensuring that they have equal heights. Examples (Source code, png, pdf)     Parameters

figmatplotlib.figure.Figure

*argstuple (nrows, ncols, index) or int

The array of subplots in the figure has dimensions (nrows,
ncols), and index is the index of the subplot being created. index starts at 1 in the upper left corner and increases to the right. If nrows, ncols, and index are all single digit numbers, then args can be passed as a single 3-digit number (e.g. 234 for (2, 3, 4)).       locate(nx, ny, nx1=None, ny1=None, axes=None, renderer=None)[source]

 Parameters

nx, nx1int

Integers specifying the column-position of the cell. When nx1 is None, a single nx-th column is specified. Otherwise location of columns spanning between nx to nx1 (but excluding nx1-th column) is specified.
ny, ny1int

Same as nx and nx1, but for row positions.  axes
renderer

   new_locator(nx, nx1=None)[source]

Create a new AxesLocator for the specified cell.  Parameters

nx, nx1int

Integers specifying the column-position of the cell. When nx1 is None, a single nx-th column is specified. Otherwise location of columns spanning between nx to nx1 (but excluding nx1-th column) is specified.

  Examples using mpl_toolkits.axes_grid1.axes_divider.HBoxDivider

   HBoxDivider demo


new_locator(nx, nx1=None)[source]

Create a new AxesLocator for the specified cell.  Parameters

nx, nx1int

Integers specifying the column-position of the cell. When nx1 is None, a single nx-th column is specified. Otherwise location of columns spanning between nx to nx1 (but excluding nx1-th column) is specified.


mpl_toolkits.axes_grid1.axes_divider.make_axes_area_auto_adjustable   mpl_toolkits.axes_grid1.axes_divider.make_axes_area_auto_adjustable(ax, use_axes=None, pad=0.1, adjust_dirs=None)[source]

  Examples using mpl_toolkits.axes_grid1.axes_divider.make_axes_area_auto_adjustable

   Make Room For Ylabel Using Axesgrid


mpl_toolkits.axes_grid1.axes_divider.SubplotDivider   classmpl_toolkits.axes_grid1.axes_divider.SubplotDivider(fig, *args, horizontal=None, vertical=None, aspect=None, anchor='C')[source]

Bases: mpl_toolkits.axes_grid1.axes_divider.Divider The Divider class whose rectangle area is specified as a subplot geometry.  Parameters

figmatplotlib.figure.Figure

*argstuple (nrows, ncols, index) or int

The array of subplots in the figure has dimensions (nrows,
ncols), and index is the index of the subplot being created. index starts at 1 in the upper left corner and increases to the right. If nrows, ncols, and index are all single digit numbers, then args can be passed as a single 3-digit number (e.g. 234 for (2, 3, 4)).       change_geometry(numrows, numcols, num)[source]

[Deprecated] Change subplot geometry, e.g., from (1, 1, 1) to (2, 2, 3). Notes  Deprecated since version 3.4.
   propertyfigbox[source]

   get_geometry()[source]

[Deprecated] Get the subplot geometry, e.g., (2, 2, 3). Notes  Deprecated since version 3.4.
   get_position()[source]

Return the bounds of the subplot box.
   get_subplotspec()[source]

Get the SubplotSpec instance.
   set_subplotspec(subplotspec)[source]

Set the SubplotSpec instance.
   update_params()[source]

[Deprecated] Notes  Deprecated since version 3.4:


change_geometry(numrows, numcols, num)[source]

[Deprecated] Change subplot geometry, e.g., from (1, 1, 1) to (2, 2, 3). Notes  Deprecated since version 3.4.


get_geometry()[source]

[Deprecated] Get the subplot geometry, e.g., (2, 2, 3). Notes  Deprecated since version 3.4.


get_position()[source]

Return the bounds of the subplot box.


get_subplotspec()[source]

Get the SubplotSpec instance.


set_subplotspec(subplotspec)[source]

Set the SubplotSpec instance.


update_params()[source]

[Deprecated] Notes  Deprecated since version 3.4:


mpl_toolkits.axes_grid1.axes_divider.VBoxDivider   classmpl_toolkits.axes_grid1.axes_divider.VBoxDivider(fig, *args, horizontal=None, vertical=None, aspect=None, anchor='C')[source]

Bases: mpl_toolkits.axes_grid1.axes_divider.SubplotDivider A SubplotDivider for laying out axes vertically, while ensuring that they have equal widths.  Parameters

figmatplotlib.figure.Figure

*argstuple (nrows, ncols, index) or int

The array of subplots in the figure has dimensions (nrows,
ncols), and index is the index of the subplot being created. index starts at 1 in the upper left corner and increases to the right. If nrows, ncols, and index are all single digit numbers, then args can be passed as a single 3-digit number (e.g. 234 for (2, 3, 4)).       locate(nx, ny, nx1=None, ny1=None, axes=None, renderer=None)[source]

 Parameters

nx, nx1int

Integers specifying the column-position of the cell. When nx1 is None, a single nx-th column is specified. Otherwise location of columns spanning between nx to nx1 (but excluding nx1-th column) is specified.
ny, ny1int

Same as nx and nx1, but for row positions.  axes
renderer

   new_locator(ny, ny1=None)[source]

Create a new AxesLocator for the specified cell.  Parameters

ny, ny1int

Integers specifying the row-position of the cell. When ny1 is None, a single ny-th row is specified. Otherwise location of rows spanning between ny to ny1 (but excluding ny1-th row) is specified.


locate(nx, ny, nx1=None, ny1=None, axes=None, renderer=None)[source]

 Parameters

nx, nx1int

Integers specifying the column-position of the cell. When nx1 is None, a single nx-th column is specified. Otherwise location of columns spanning between nx to nx1 (but excluding nx1-th column) is specified.
ny, ny1int

Same as nx and nx1, but for row positions.  axes
renderer


new_locator(ny, ny1=None)[source]

Create a new AxesLocator for the specified cell.  Parameters

ny, ny1int

Integers specifying the row-position of the cell. When ny1 is None, a single ny-th row is specified. Otherwise location of rows spanning between ny to ny1 (but excluding ny1-th row) is specified.


mpl_toolkits.axes_grid1.axes_grid  Classes
AxesGrid alias of mpl_toolkits.axes_grid1.axes_grid.ImageGrid
CbarAxes(*args, orientation, **kwargs) [Deprecated]
CbarAxesBase(*args, orientation, **kwargs)
Grid(fig, rect, nrows_ncols[, ngrids, ...]) A grid of Axes.
ImageGrid(fig, rect, nrows_ncols[, ngrids, ...])
 Parameters


mpl_toolkits.axes_grid1.axes_grid.AxesGrid   mpl_toolkits.axes_grid1.axes_grid.AxesGrid[source]

alias of mpl_toolkits.axes_grid1.axes_grid.ImageGrid


mpl_toolkits.axes_grid1.axes_grid.CbarAxes   classmpl_toolkits.axes_grid1.axes_grid.CbarAxes(*args, orientation, **kwargs)[source]

Bases: mpl_toolkits.axes_grid1.axes_grid.CbarAxesBase, mpl_toolkits.axes_grid1.mpl_axes.Axes [Deprecated] Notes  Deprecated since version 3.5:   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.       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


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


mpl_toolkits.axes_grid1.axes_grid.CbarAxesBase   classmpl_toolkits.axes_grid1.axes_grid.CbarAxesBase(*args, orientation, **kwargs)[source]

Bases: object   cla()[source]

   colorbar(mappable, *, ticks=None, **kwargs)[source]

   toggle_label(b)[source]


colorbar(mappable, *, ticks=None, **kwargs)[source]


mpl_toolkits.axes_grid1.axes_grid.Grid   classmpl_toolkits.axes_grid1.axes_grid.Grid(fig, rect, nrows_ncols, ngrids=None, direction='row', axes_pad=0.02, *, share_all=False, share_x=True, share_y=True, label_mode='L', axes_class=None, aspect=False)[source]

Bases: object A grid of Axes. In Matplotlib, the axes location (and size) is specified in normalized figure coordinates. This may not be ideal for images that needs to be displayed with a given aspect ratio; for example, it is difficult to display multiple images of a same size with some fixed padding between them. AxesGrid can be used in such case.  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.02

Padding or (horizontal padding, vertical padding) between axes, in inches.
share_allbool, default: False

Whether all axes share their x- and y-axis. Overrides share_x and share_y.
share_xbool, default: True

Whether all axes of a column share their x-axis.
share_ybool, default: True

Whether all axes of a row share their y-axis.
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.
axes_classsubclass of matplotlib.axes.Axes, default: None

aspectbool, default: False

Whether the axes aspect ratio follows the aspect ratio of the data limits.       get_aspect()[source]

Return the aspect of the SubplotDivider.
   get_axes_locator()[source]

   get_axes_pad()[source]

Return the axes padding.  Returns
 hpad, vpad

Padding (horizontal pad, vertical pad) in inches.
   get_divider()[source]

   get_geometry()[source]

Return the number of rows and columns of the grid as (nrows, ncols).
   get_vsize_hsize()[source]

[Deprecated] Notes  Deprecated since version 3.5:
   set_aspect(aspect)[source]

Set the aspect of the SubplotDivider.
   set_axes_locator(locator)[source]

   set_axes_pad(axes_pad)[source]

Set the padding between the axes.  Parameters

axes_pad(float, float)

The padding (horizontal pad, vertical pad) in inches.
   set_label_mode(mode)[source]

Define which axes have tick labels.  Parameters

mode{"L", "1", "all"}

The label mode:  "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.


get_aspect()[source]

Return the aspect of the SubplotDivider.


get_axes_pad()[source]

Return the axes padding.  Returns
 hpad, vpad

Padding (horizontal pad, vertical pad) in inches.


get_geometry()[source]

Return the number of rows and columns of the grid as (nrows, ncols).


get_vsize_hsize()[source]

[Deprecated] Notes  Deprecated since version 3.5:


set_aspect(aspect)[source]

Set the aspect of the SubplotDivider.


set_axes_pad(axes_pad)[source]

Set the padding between the axes.  Parameters

axes_pad(float, float)

The padding (horizontal pad, vertical pad) in inches.


set_label_mode(mode)[source]

Define which axes have tick labels.  Parameters

mode{"L", "1", "all"}

The label mode:  "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.


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


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


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


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


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


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


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]


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]


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


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


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


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]


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)


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.


__call__(renderer)[source]

Call self as a function.


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]


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.


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.


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]


mpl_toolkits.axes_grid1.axes_size.Scalable   mpl_toolkits.axes_grid1.axes_size.Scalable[source]

alias of mpl_toolkits.axes_grid1.axes_size.Scaled


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


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]


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.


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


__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


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


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.


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


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


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


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


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


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


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.


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


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


mpl_toolkits.axes_grid1.mpl_axes  Classes
Axes(fig, rect, *[, facecolor, frameon, ...]) Build an Axes in a figure.
SimpleAxisArtist(axis, axisnum, spine)
SimpleChainedObjects(objects)


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


classAxisDict(axes)[source]

Bases: dict   __call__(*v, **kwargs)[source]

Call self as a function.


__call__(*v, **kwargs)[source]

Call self as a function.


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