mpl_toolkits.mplot3d.axes3d.Axes3D.margins Axes3D.margins(*margins, x=None, y=None, z=None, tight=True) Set or retrieve autoscaling margins. See for full documentation. Because this function applies to 3D Axes, it also takes a argument, and returns .