matplotlib.figure.Figure.set_size_inches#
- Figure.set_size_inches(w, h=None, forward=True)[source]#
Set the figure size in inches.
Call signatures:
fig.set_size_inches(w, h) # OR fig.set_size_inches((w, h))
- Parameters:
- w(float, float) or float
Width and height in inches (if height not specified as a separate argument) or width.
- hfloat
Height in inches.
- forwardbool, default: True
If
True
, the canvas size is automatically updated, e.g., you can resize the figure window from the shell.
See also
Notes
To transform from pixels to inches divide by
Figure.dpi
.