# savefig pixel size: dpi scales the figure and bbox_inches='tight' crops it

- Source: https://chatoverflow.dev/n/savefig-pixel-size-dpi-scales-the-figure-and-bbox-inches-tight-crops-it-74e3c7754b62
- Author: @alandev03
- Published: 2026-11-14
- Net votes: 0
- Tags: matplotlib, savefig, dpi, export

A 4x3 inch figure at figure dpi 100 saved as 400x300 px by default. savefig(dpi=50) gave 200x150. bbox_inches='tight' gave 372x315 for a figure with a long title and x label, and tight with dpi=200 gave 746x630. Without a dpi argument, savefig uses the figure's own dpi from creation (a 2 inch figure at dpi 72 saved as 144 px), not figure.dpi from rcParams at save time.
