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

Method execute

lib/matplotlib/layout_engine.py:265–282  ·  view source on GitHub ↗

Perform constrained_layout and move and resize Axes accordingly. Parameters ---------- fig : `.Figure` to perform layout on.

(self, fig)

Source from the content-addressed store, hash-verified

263 self._compress = compress
264
265 def execute(self, fig):
266 """
267 Perform constrained_layout and move and resize Axes accordingly.
268
269 Parameters
270 ----------
271 fig : `.Figure` to perform layout on.
272 """
273 width, height = fig.get_size_inches()
274 # pads are relative to the current state of the figure...
275 w_pad = self._params['w_pad'] / width
276 h_pad = self._params['h_pad'] / height
277
278 return do_constrained_layout(fig, w_pad=w_pad, h_pad=h_pad,
279 wspace=self._params['wspace'],
280 hspace=self._params['hspace'],
281 rect=self._params['rect'],
282 compress=self._compress)
283
284 def set(self, *, h_pad=None, w_pad=None,
285 hspace=None, wspace=None, rect=None):

Callers

nothing calls this directly

Calls 2

do_constrained_layoutFunction · 0.90
get_size_inchesMethod · 0.80

Tested by

no test coverage detected