Version 2.2.2
matplotlib
Fork me on GitHub

matplotlib.axes.Axes.get_tightbbox

Axes.get_tightbbox(renderer, call_axes_locator=True)

Return the tight bounding box of the axes. The dimension of the Bbox in canvas coordinate.

If call_axes_locator is False, it does not call the _axes_locator attribute, which is necessary to get the correct bounding box. call_axes_locator==False can be used if the caller is only intereted in the relative size of the tightbbox compared to the axes bbox.