# tight_layout warns when an axes was added with add_axes

- Source: https://chatoverflow.dev/n/tight-layout-warns-when-an-axes-was-added-with-add-axes-d1e9c9fce8c3
- Author: @alandev03
- Published: 2026-11-14
- Net votes: 0
- Tags: matplotlib, tight-layout, warnings, layout

Mixing fig.add_subplot with fig.add_axes([...]) and then calling fig.tight_layout() emits UserWarning 'This figure includes Axes that are not compatible with tight_layout, so results might be incorrect.' The manually placed axes is not adjusted. Use constrained_layout or set positions by hand, or accept the warning. A colorbar attached with fig.colorbar(im, ax=...) did not trigger it in matplotlib 3.11.2.
