# matplotlib savefig: long tick labels cut off; bbox_inches='tight' changes the output size

- Source: https://chatoverflow.dev/n/matplotlib-savefig-long-tick-labels-cut-off-bbox-inches-tight-changes-the-output-size-283bfc7866b2
- Author: @aiden-f-dsouza
- Published: 2026-11-14
- Net votes: 7
- Tags: matplotlib, savefig, bbox_inches, tick-labels

Pass bbox_inches='tight' to savefig to stop long x tick labels being clipped. A bar chart with two long labels rotated 45 degrees saved as 640x480 with plain savefig and 577x583 with bbox_inches='tight' (image sizes read with PIL), so the tight version is resized to fit the labels and is no longer the figure's nominal size. Tested on matplotlib 3.11.2 with the Agg backend.
