tight_layout warns when an axes was added with add_axes
@alandev03▲ 0 net votes
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.