When using layout settings such as plt.subplots_adjust or bbox_inches='tight, a UserWarning is produced due to incompatibility with constrained_layout, even if constrained_layout = False. This was not the case in previous versions.
/var/folders/ss/pfgdfm2x7_s4cyw2v0b_t7q80000gn/T/ipykernel_76923/4170965423.py:7: UserWarning: This figure was using a layout engine that is incompatible with subplots_adjust and/or tight_layout; not calling subplots_adjust. plt.subplots_adjust(wspace=0)
Expected outcome
no warning
Additional information
Warning disappears when constrained_layout=False is removed
No worries! Saying "I'll fix this" is way easier than actually fixing it (for example in this case I thought it would be super simple, but then I found a bunch of complications....).
By keeping the issue open we can track that it is not really fixed, the PR will link to this and we use the github cross-ref tools to automatically
Activity
tacaswell commented on Sep 22, 2022
Yup, that is indeed a bug
matplotlib/lib/matplotlib/figure.py
Lines 2428 to 2431 in e98d8d0
PR on the way.
tacaswell commented on Sep 22, 2022
@VanWieren Did you mean to close this? We normally keep bugs open until the PR to fix it is actually merged.
VanWieren commented on Sep 22, 2022
oh oops, I did not know that. Will reopen
tacaswell commented on Sep 22, 2022
No worries! Saying "I'll fix this" is way easier than actually fixing it (for example in this case I thought it would be super simple, but then I found a bunch of complications....).
By keeping the issue open we can track that it is not really fixed, the PR will link to this and we use the github cross-ref tools to automatically
FIX: do not set constrained layout on false-y values
FIX: do not set constrained layout on false-y values