Perform constrained_layout and move and resize Axes accordingly. Parameters ---------- fig : `.Figure` to perform layout on.
(self, fig)
| 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): |
nothing calls this directly
no test coverage detected