Figure.auto_layout(renderer=None, resize=None, aspect=None, tight=None)[source]

Automatically adjust the figure size and subplot positions. This is triggered automatically whenever the figure is drawn.

  • renderer (RendererBase, optional) – The renderer. If None a default renderer will be produced.

  • resize (bool, optional) – If False, the current figure dimensions are fixed and automatic figure resizing is disabled. This is set to False if the current backend is the interactive ipython notebook backend, which cannot handle automatic resizing. By default, the figure size may change unless both figwidth and figheight or figsize were passed to subplots, set_size_inches was called manually, or the figure was resized manually with an interactive backend.

  • aspect (bool, optional) – Whether to update the figure size based on the reference subplot aspect ratio. By default, this is True. This only has an effect if the aspect ratio is fixed (e.g., due to an image plot or geographic projection).

  • tight (bool, optional) – Whether to update the figuer size and subplot positions according to a “tight layout”. By default, this takes on the value of tight passed to Figure. If nothing was passed, it is rc['subplots.tight'] = True.