Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit65cdd57

Browse files
committed
TST: add new api to couple tests in test_constrainedlayout
1 parent9e9fc7b commit65cdd57

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

‎lib/matplotlib/tests/test_constrainedlayout.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -103,9 +103,9 @@ def test_constrained_layout5():
103103
deftest_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
forgsingsl:
111111
ax=fig.add_subplot(gs)
@@ -128,7 +128,7 @@ def test_constrained_layout7():
128128
withpytest.warns(UserWarning,match='Calling figure.constrained_layout, '
129129
'but figure not setup to do constrained layout'):
130130
fig=plt.figure(constrained_layout=True)
131-
gs=gridspec.GridSpec(1,2)
131+
gs=fig.add_gridspec(1,2)
132132
gsl=gridspec.GridSpecFromSubplotSpec(2,2,gs[0])
133133
gsr=gridspec.GridSpecFromSubplotSpec(1,2,gs[1])
134134
axsl= []

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp