Skip to content

Commit eb410f0

Browse files
committed
TST: testt hidden axes
1 parent 0058693 commit eb410f0

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

lib/matplotlib/tests/test_constrainedlayout.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -387,3 +387,13 @@ def test_colorbar_location():
387387
fig.colorbar(pcm, ax=axs[-2, 3:], shrink=0.5, location='top')
388388
fig.colorbar(pcm, ax=axs[0, 0], shrink=0.5, location='left')
389389
fig.colorbar(pcm, ax=axs[1:3, 2], shrink=0.5, location='right')
390+
391+
392+
def test_hidden_axes():
393+
fig, axs = plt.subplots(2, 2, constrained_layout=True)
394+
axs[0, 1].set_visible(False)
395+
fig.canvas.draw()
396+
extents1 = np.copy(axs[0, 0].get_position().extents)
397+
398+
np.testing.assert_allclose(extents1,
399+
[0.045552, 0.548288, 0.47319, 0.982638], rtol=1e-5)

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy