matplotlib 3.5.1

ParametersBackRef
set_aspect(self, aspect, adjustable=None, anchor=None, share=False)

Parameters

aspect : {'auto', 'equal'} or float

Possible values:

  • 'auto': fill the position rectangle with data.

  • 'equal': same as aspect=1 , i.e. same scaling for x and y.

  • float: The displayed size of 1 unit in y-data coordinates will be aspect times the displayed size of 1 unit in x-data coordinates; e.g. for aspect=2 a square in data coordinates will be rendered with a height of twice its width.

adjustable : None or {'box', 'datalim'}, optional

If not None , this defines which parameter will be adjusted to meet the required aspect. See .set_adjustable for further details.

anchor : None or str or (float, float), optional

If not None , this defines where the Axes will be drawn if there is extra space due to aspect constraints. The most common way to to specify the anchor are abbreviations of cardinal directions:

===== ===================== value description ===== ===================== 'C' centered 'SW' lower left corner 'S' middle of bottom edge 'SE' lower right corner etc. ===== =====================

See :None:None:`~.Axes.set_anchor` for further details.

share : bool, default: False

If True , apply the settings to all shared Axes.

Set the aspect ratio of the axes scaling, i.e. y/x-scale.

See Also

matplotlib.axes.Axes.set_adjustable

Set how the Axes adjusts to achieve the required aspect ratio.

matplotlib.axes.Axes.set_anchor

Set the position in case of extra space.

Examples

See :

Back References

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

scipy.spatial._geometric_slerp.geometric_slerp scipy.interpolate._cubic.CubicSpline

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/axes/_base.py#1587
type: <class 'function'>
Commit: