MCPcopy Index your code
hub / github.com/matplotlib/matplotlib / _get_tightbbox_for_layout_only

Function _get_tightbbox_for_layout_only

lib/matplotlib/artist.py:1478–1487  ·  view source on GitHub ↗

Matplotlib's `.Axes.get_tightbbox` and `.Axis.get_tightbbox` support a *for_layout_only* kwarg; this helper tries to use the kwarg but skips it when encountering third-party subclasses that do not support it.

(obj, *args, **kwargs)

Source from the content-addressed store, hash-verified

1476
1477
1478def _get_tightbbox_for_layout_only(obj, *args, **kwargs):
1479 """
1480 Matplotlib's `.Axes.get_tightbbox` and `.Axis.get_tightbbox` support a
1481 *for_layout_only* kwarg; this helper tries to use the kwarg but skips it
1482 when encountering third-party subclasses that do not support it.
1483 """
1484 try:
1485 return obj.get_tightbbox(*args, **{**kwargs, "for_layout_only": True})
1486 except TypeError:
1487 return obj.get_tightbbox(*args, **kwargs)
1488
1489
1490class ArtistInspector:

Callers

nothing calls this directly

Calls 1

get_tightbboxMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…