Skip to content

Commit e78aee9

Browse files
authored
Merge pull request #17494 from jklymak/new-layout-just-layout
Rewrite of constrained_layout....
2 parents 0e87f48 + 8db28aa commit e78aee9

36 files changed

+1365
-1656
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
Constrained layout rewrite
2+
~~~~~~~~~~~~~~~~~~~~~~~~~~
3+
4+
The layout manager ``constrained_layout`` was re-written with different
5+
outer constraints that should be more robust to complicated subplot layouts.
6+
User-facing changes are:
7+
8+
- some poorly constrained layouts will have different width/height plots than
9+
before.
10+
- colorbars now respect the ``anchor`` keyword argument of
11+
`matplotlib.colorbar.make_axes`
12+
- colorbars are wider.
13+
- colorbars in different rows or columns line up more robustly.
14+
- *hspace* and *wspace* options to `.Figure.set_constrained_layout_pads`
15+
were twice as wide as the docs said they should be. So these now follow
16+
the docs.
17+
18+
This feature will remain "experimental" until the new changes have been
19+
used enough by users, so we anticipate version 3.5 or 3.6. On the other hand,
20+
``constrained_layout`` is extensively tested and used in examples in the
21+
library, so using it should be safe, but layouts may not be exactly the same
22+
as more development takes place.
23+
24+
Details of using ``constrained_layout``, and its algorithm are available at
25+
:doc:`/tutorials/intermediate/constrainedlayout_guide`

lib/matplotlib/_constrained_layout.py

+507-563
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)