8000 TST: test for big floats in array being clipped properly if clim reset · matplotlib/matplotlib@4529d6f · GitHub
[go: up one dir, main page]

Skip to content

Commit 4529d6f

Browse files
committed
TST: test for big floats in array being clipped properly if clim reset
1 parent 104e624 commit 4529d6f

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed
Loading

lib/matplotlib/tests/test_image.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -856,6 +856,19 @@ def test_imshow_bignumbers():
856856
pc = ax.imshow(img)
857857
pc.set_clim(0, 5)
858858

859+
860+
@image_comparison(baseline_images=['imshow_bignumbers_real'],
861+
remove_text=True, style='mpl20',
862+
extensions=['png'])
863+
def test_imshow_bignumbers_real():
864+
# putting a big number in an array of integers shouldn't
865+
# ruin the dynamic range of the resolved bits.
866+
fig, ax = plt.subplots()
867+
img = np.array([[2., 1., 1.e22],[4., 1., 3.]])
868+
pc = ax.imshow(img)
869+
pc.set_clim(0, 5)
870+
871+
859872
@pytest.mark.parametrize(
860873
"make_norm",
861874
[colors.Normalize,

0 commit comments

Comments
 (0)
0