Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 4725daa

Browse files
tacaswellQuLogic
andauthored
MNT: changes from review
Co-authored-by: Elliott Sales de Andrade <[email protected]>
1 parent f7f3bb6 commit 4725daa

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

lib/matplotlib/figure.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2414,8 +2414,8 @@ def set_layout_engine(self, layout=None, **kwargs):
24142414
24152415
If `None`, the behavior is controlled by :rc:`figure.autolayout`
24162416
(which if `True` behaves as if 'tight' were passed) and
2417-
:rc:`figure.constrained_layout.use` (which if true behaves as if
2418-
'constrained' were passed). If both are true,
2417+
:rc:`figure.constrained_layout.use` (which if `True` behaves as if
2418+
'constrained' were passed). If both are `True`,
24192419
:rc:`figure.autolayout` takes priority.
24202420
24212421
Users and libraries can define their own layout engines and pass

lib/matplotlib/tests/test_figure.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -591,12 +591,11 @@ def test_invalid_layouts():
591591
with pytest.raises(RuntimeError, match='Colorbar layout of new layout'):
592592
fig.set_layout_engine("constrained")
593593
fig.set_layout_engine("none")
594+
assert isinstance(fig.get_layout_engine(), PlaceHolderLayoutEngine)
595+
594596
with pytest.raises(RuntimeError, match='Colorbar layout of new layout'):
595597
fig.set_layout_engine("constrained")
596598

597-
fig.set_layout_engine("none")
598-
assert isinstance(fig.get_layout_engine(), PlaceHolderLayoutEngine)
599-
600599

601600
@check_figures_equal(extensions=["png", "pdf"])
602601
def test_add_artist(fig_test, fig_ref):

0 commit comments

Comments
 (0)