matplotlib.axes.Axes.set_adjustable#

Axes.set_adjustable(adjustable,share=False)[source]#

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

Parameters:
adjustable{'box', 'datalim'}

If 'box', change the physical dimensions of the Axes.If 'datalim', change thex ory data limits. Thismay ignore explicitly defined axis limits.

sharebool, default: False

IfTrue, apply the settings to all shared Axes.

See also

matplotlib.axes.Axes.get_adjustable

Return the current value ofadjustable.

matplotlib.axes.Axes.set_aspect

For a description of aspect handling.

Notes

Shared Axes (of which twinned Axes are a special case)impose restrictions on how aspect ratios can be imposed.For twinned Axes, use 'datalim'. For Axes that share bothx and y, use 'box'. Otherwise, either 'datalim' or 'box'may be used. These limitations are partly a requirementto avoid over-specification, and partly a result of theparticular implementation we are currently using, inwhich the adjustments for aspect ratios are done sequentiallyand independently on each Axes as it is drawn.

Examples usingmatplotlib.axes.Axes.set_adjustable#

Loglog aspect

Loglog aspect