constrained-layout gives wrong results when explicitly equal width ratios are set #17304
Labels
topic: geometry manager
LayoutEngine, Constrained layout, Tight layout
Milestone
Bug report
Bug summary
When passing
width_ratios = [1, 1, 1]
instead of not passing it at all (which should be synonymous), constrained_layout sometimes gives incorrect results.Code for reproduction
Actual outcome
cl1.png

cl2.png

Clearly in cl2.png the widths are not in the ratios 1:1:1 but (approximately) 1:2:1.
This is likely a floating point error; it is extremely sensitive to conditions, in particular the call to
set_font_settings_for_reproducibility
(which just sets some font-related rcs) is necessary to observe this.Expected outcome
twice the same image
Matplotlib version
print(matplotlib.get_backend())
): aggThe text was updated successfully, but these errors were encountered: