Figure.set_size_inches

Figure.set_size_inches(w, h=None, *, forward=True, internal=False, eps=None)[source]

Set the figure size. If this is being called manually or from an interactive backend, update the default layout with this fixed size. If the figure size is unchanged or this is an internal call, do not update the default layout.

Parameters
  • *args (float) – The width and height passed as positional arguments or a 2-tuple.

  • forward (bool, optional) – Whether to update the canvas.

  • internal (bool, optional) – Whether this is an internal resize.

  • eps (float, optional) – The deviation from the current size in inches required to treat this as a user-triggered figure resize that fixes the layout.