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

Skip to content

Commit 2d337ac

Browse files
committed
TST: add new api to couple tests in test_constrainedlayout
1 parent dca12a4 commit 2d337ac

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/matplotlib/tests/test_constrainedlayout.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -103,9 +103,9 @@ def test_constrained_layout5():
103103
def test_constrained_layout6():
104104
'Test constrained_layout for nested gridspecs'
105105
fig = plt.figure(constrained_layout=True)
106-
gs = gridspec.GridSpec(1, 2, figure=fig)
107-
gsl = gridspec.GridSpecFromSubplotSpec(2, 2, gs[0])
108-
gsr = gridspec.GridSpecFromSubplotSpec(1, 2, gs[1])
106+
gs = fig.add_gridspec(1, 2, figure=fig)
107+
gsl = gs[0].subgridspec(2, 2)
108+
gsr = gs[1].subgridspec(1, 2)
109109
axsl = []
110110
for gs in gsl:
111111
ax = fig.add_subplot(gs)

0 commit comments

Comments
 (0)