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

Method set_tight_layout

lib/matplotlib/figure.py:2893–2909  ·  view source on GitHub ↗

Set whether and how `.Figure.tight_layout` is called when drawing. Parameters ---------- tight : bool or dict with keys "pad", "w_pad", "h_pad", "rect" or None If a bool, sets whether to call `.Figure.tight_layout` upon drawing. If ``None``,

(self, tight)

Source from the content-addressed store, hash-verified

2891 @_api.deprecated("3.6", alternative="set_layout_engine",
2892 pending=True)
2893 def set_tight_layout(self, tight):
2894 """
2895 Set whether and how `.Figure.tight_layout` is called when drawing.
2896
2897 Parameters
2898 ----------
2899 tight : bool or dict with keys "pad", "w_pad", "h_pad", "rect" or None
2900 If a bool, sets whether to call `.Figure.tight_layout` upon drawing.
2901 If ``None``, use :rc:`figure.autolayout` instead.
2902 If a dict, pass it as kwargs to `.Figure.tight_layout`, overriding the
2903 default paddings.
2904 """
2905 tight = mpl._val_or_rc(tight, 'figure.autolayout')
2906 _tight = 'tight' if bool(tight) else 'none'
2907 _tight_parameters = tight if isinstance(tight, dict) else {}
2908 self.set_layout_engine(_tight, **_tight_parameters)
2909 self.stale = True
2910
2911 def get_constrained_layout(self):
2912 """

Callers 2

test_tight_padsFunction · 0.80
test_tight_toggleFunction · 0.80

Calls 1

set_layout_engineMethod · 0.95

Tested by 2

test_tight_padsFunction · 0.64
test_tight_toggleFunction · 0.64