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

Skip to content

Commit 17b9000

Browse files
committed
FIX: Create a new ScalarMappable for axes_grid test
There is some shared state when adding colorbars to the axes_grid test here due to competing calls with colorbar.update_normal. To avoid that, we create a new ScalarMappable instance that creates a new norm that doesn't share state.
1 parent 2dde636 commit 17b9000

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

lib/mpl_toolkits/tests/test_axes_grid.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,6 @@ def test_imagegrid_cbar_mode_edge():
4141
ax3.imshow(np.abs(arr), cmap='jet')
4242
ax4.imshow(np.arctan2(arr.imag, arr.real), cmap='hsv')
4343

44-
# In each row/column, the "first" colorbars must be overwritten by the
45-
# "second" ones. To achieve this, clear out the axes first.
4644
for ax in grid:
4745
ax.cax.cla()
4846
cb = ax.cax.colorbar(ax.images[0])

0 commit comments

Comments
 (0)