matplotlib 3.5.1

Other ParametersParametersReturnsBackRef
make_axes(parents, location=None, orientation=None, fraction=0.15, shrink=1.0, aspect=20, **kw)

The axes is placed in the figure of the parents axes, by resizing and repositioning parents.

Other Parameters

pad : float, default: 0.05 if vertical, 0.15 if horizontal

Fraction of original axes between colorbar and new image axes.

anchor : (float, float), optional

The anchor point of the colorbar axes. Defaults to (0.0, 0.5) if vertical; (0.5, 1.0) if horizontal.

panchor : (float, float), or *False*, optional

The anchor point of the colorbar parent axes. If False, the parent axes' anchor will be unchanged. Defaults to (1.0, 0.5) if vertical; (0.5, 0.0) if horizontal.

Parameters

parents : `~.axes.Axes` or list of `~.axes.Axes`

The Axes to use as parents for placing the colorbar.

location : None or {'left', 'right', 'top', 'bottom'}

The location, relative to the parent axes, where the colorbar axes is created. It also determines the orientation of the colorbar (colorbars on the left and right are vertical, colorbars at the top and bottom are horizontal). If None, the location will come from the orientation if it is set (vertical colorbars on the right, horizontal ones at the bottom), or default to 'right' if orientation is unset.

orientation : None or {'vertical', 'horizontal'}

The orientation of the colorbar. It is preferable to set the location of the colorbar, as that also determines the orientation; passing incompatible values for location and orientation raises an exception.

fraction : float, default: 0.15

Fraction of original axes to use for colorbar.

shrink : float, default: 1.0

Fraction by which to multiply the size of the colorbar.

aspect : float, default: 20

Ratio of long to short dimensions.

Returns

cax : `~.axes.Axes`

The child axes.

kw : dict

The reduced keyword dictionary to be passed when creating the colorbar instance.

Create an :None:None:`~.axes.Axes` suitable for a colorbar.

Examples

See :

Back References

The following pages refer to to this document either explicitly or contain code examples using this.

matplotlib.colorbar.make_axes_gridspec

Local connectivity graph

Hover to see nodes names; edges to Self not shown, Caped at 50 nodes.

Using a canvas is more power efficient and can get hundred of nodes ; but does not allow hyperlinks; , arrows or text (beyond on hover)

SVG is more flexible but power hungry; and does not scale well to 50 + nodes.

All aboves nodes referred to, (or are referred from) current nodes; Edges from Self to other have been omitted (or all nodes would be connected to the central node "self" which is not useful). Nodes are colored by the library they belong to, and scaled with the number of references pointing them


File: /matplotlib/colorbar.py#1370
type: <class 'function'>
Commit: