ax1 = plt.subplot2grid((4, 5), (0, 0))
// this is the bad entry:
ax5 = plt.subplot2grid((5, 5), (0, 3), colspan=3, rowspan=5)
with warnings.catch_warnings(record=True) as w:
plt.tight_layout()
assert len(w) == 1
def test_collapsed():
// test that if a call to tight_layout will collapses the axes that
// it does not get applied:
fig, ax = plt.subplots(tight_layout=True)
After Change
ax1 = plt.subplot2grid((4, 5), (0, 0))
// this is the bad entry:
ax5 = plt.subplot2grid((5, 5), (0, 3), colspan=3, rowspan=5)
with pytest.warns(UserWarning):
plt.tight_layout()
def test_collapsed():
// test that if a call to tight_layout will collapses the axes that
// it does not get applied:
fig, ax = plt.subplots(tight_layout=True)