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

Method subplots_adjust

lib/matplotlib/figure.py:1322–1364  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

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 """

Callers 15

autofmt_xdateMethod · 0.95
test_inset_axes_completeFunction · 0.80
executeMethod · 0.80
__init__Method · 0.80
_on_slider_changedMethod · 0.80
subplots_adjustFunction · 0.80
configure_subplotsMethod · 0.80
_on_value_changedMethod · 0.80
test_date_axhspanFunction · 0.80
test_date_axhlineFunction · 0.80
test_date_inverted_limitFunction · 0.80

Calls 5

_set_positionMethod · 0.80
get_layout_engineMethod · 0.45
updateMethod · 0.45
get_subplotspecMethod · 0.45
get_positionMethod · 0.45

Tested by 15

test_inset_axes_completeFunction · 0.64
test_date_axhspanFunction · 0.64
test_date_axhlineFunction · 0.64
test_date_inverted_limitFunction · 0.64
_save_figureFunction · 0.64
test_clipperFunction · 0.64
test_label_without_ticksFunction · 0.64
test_skew_rectangleFunction · 0.64