Adjust the subplot layout parameters. Unset parameters are left unmodified; initial values are given by :rc:`figure.subplot.[name]`. .. plot:: _embedded_plots/figure_subplots_adjust.py Parameters ---------- left : float, optional
(self, left=None, bottom=None, right=None, top=None,
wspace=None, hspace=None)
| 1320 | return cb |
| 1321 | |
| 1322 | def subplots_adjust(self, left=None, bottom=None, right=None, top=None, |
| 1323 | wspace=None, hspace=None): |
| 1324 | """ |
| 1325 | Adjust the subplot layout parameters. |
| 1326 | |
| 1327 | Unset parameters are left unmodified; initial values are given by |
| 1328 | :rc:`figure.subplot.[name]`. |
| 1329 | |
| 1330 | .. plot:: _embedded_plots/figure_subplots_adjust.py |
| 1331 | |
| 1332 | Parameters |
| 1333 | ---------- |
| 1334 | left : float, optional |
| 1335 | The position of the left edge of the subplots, |
| 1336 | as a fraction of the figure width. |
| 1337 | right : float, optional |
| 1338 | The position of the right edge of the subplots, |
| 1339 | as a fraction of the figure width. |
| 1340 | bottom : float, optional |
| 1341 | The position of the bottom edge of the subplots, |
| 1342 | as a fraction of the figure height. |
| 1343 | top : float, optional |
| 1344 | The position of the top edge of the subplots, |
| 1345 | as a fraction of the figure height. |
| 1346 | wspace : float, optional |
| 1347 | The width of the padding between subplots, |
| 1348 | as a fraction of the average Axes width. |
| 1349 | hspace : float, optional |
| 1350 | The height of the padding between subplots, |
| 1351 | as a fraction of the average Axes height. |
| 1352 | """ |
| 1353 | if (self.get_layout_engine() is not None and |
| 1354 | not self.get_layout_engine().adjust_compatible): |
| 1355 | _api.warn_external( |
| 1356 | "This figure was using a layout engine that is " |
| 1357 | "incompatible with subplots_adjust and/or tight_layout; " |
| 1358 | "not calling subplots_adjust.") |
| 1359 | return |
| 1360 | self.subplotpars.update(left, bottom, right, top, wspace, hspace) |
| 1361 | for ax in self.axes: |
| 1362 | if ax.get_subplotspec() is not None: |
| 1363 | ax._set_position(ax.get_subplotspec().get_position(self)) |
| 1364 | self.stale = True |
| 1365 | |
| 1366 | def align_xlabels(self, axs=None): |
| 1367 | """ |