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

Skip to content

Commit e5f073c

Browse files
committed
TST: colorbar check for constrained layout
1 parent b76aeaa commit e5f073c

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

lib/matplotlib/tests/test_constrainedlayout.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -377,3 +377,14 @@ def test_constrained_layout19():
377377
ax.set_title('')
378378
fig.canvas.draw()
379379
assert all(ax.get_position().extents == ax2.get_position().extents)
380+
381+
382+
def test_constrained_layout20():
383+
'Smoke test cl does not mess up added axes'
384+
gx = np.linspace(-5, 5, 4)
385+
img = np.hypot(gx, gx[:, None])
386+
387+
fig = plt.figure()
388+
ax = fig.add_axes([0, 0, 1, 1])
389+
mesh = ax.pcolormesh(gx, gx, img)
390+
fig.colorbar(mesh)

0 commit comments

Comments
 (0)