We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c682ca4 commit cc034adCopy full SHA for cc034ad
lib/matplotlib/tests/test_constrainedlayout.py
@@ -115,6 +115,26 @@ def test_constrained_layout6():
115
ticks=ticker.MaxNLocator(nbins=5))
116
117
118
+def test_identical_subgridspec():
119
+
120
+ fig = plt.figure(constrained_layout=True)
121
122
+ GS = fig.add_gridspec(2, 1)
123
124
+ GSA = GS[0].subgridspec(1, 3)
125
+ GSB = GS[1].subgridspec(1, 3)
126
127
+ axa = []
128
+ axb = []
129
+ for i in range(3):
130
+ axa += [fig.add_subplot(GSA[i])]
131
+ axb += [fig.add_subplot(GSB[i])]
132
133
+ fig.draw_without_rendering()
134
+ # chech first row above second
135
+ assert axa[0].get_position().y0 > axb[0].get_position().y1
136
137
138
def test_constrained_layout7():
139
"""Test for proper warning if fig not set in GridSpec"""
140
with pytest.warns(
0 commit comments