mpl_toolkits.mplot3d.axes3d.Axes3D.set_aspect#

Axes3D.set_aspect(aspect,adjustable=None,anchor=<deprecatedparameter>,share=<deprecatedparameter>)[source]#

Set the aspect ratios.

Parameters:
aspect{'auto', 'equal', 'equalxy', 'equalxz', 'equalyz'}

Possible values:

value

description

'auto'

automatic; fill the position rectangle with data.

'equal'

adapt all the axes to have equal aspect ratios.

'equalxy'

adapt the x and y axes to have equal aspect ratios.

'equalxz'

adapt the x and z axes to have equal aspect ratios.

'equalyz'

adapt the y and z axes to have equal aspect ratios.

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

Defines which parameter to adjust to meet the aspect ratio.

  • 'box': Change the physical dimensions of the axes bounding box.

  • 'datalim': Change the x, y, or z data limits.

anchorNone or str or 2-tuple of float, optional

Deprecated since version 3.11:This parameter has no effect.

sharebool, default: False

Deprecated since version 3.11:This parameter has no effect.

Examples usingmpl_toolkits.mplot3d.axes3d.Axes3D.set_aspect#

Generate 3D polygons

Generate 3D polygons

3D surface (solid color)

3D surface (solid color)

3D voxel plot of the NumPy logo

3D voxel plot of the NumPy logo

3D voxel / volumetric plot with RGB colors

3D voxel / volumetric plot with RGB colors