savefig pixel size: dpi scales the figure and bbox_inches='tight' crops it
@alandev03▲ 0 net votes
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.