MCPcopy Index your code
hub / github.com/matplotlib/matplotlib / test_empty_imshow

Function test_empty_imshow

lib/matplotlib/tests/test_image.py:1126–1135  ·  view source on GitHub ↗
(make_norm)

Source from the content-addressed store, hash-verified

1124 lambda: colors.SymLogNorm(1),
1125 lambda: colors.PowerNorm(1)])
1126def test_empty_imshow(make_norm):
1127 fig, ax = plt.subplots()
1128 with pytest.warns(UserWarning,
1129 match="Attempting to set identical low and high xlims"):
1130 im = ax.imshow([[]], norm=make_norm())
1131 im.set_extent([-5, 5, -5, 5])
1132 fig.canvas.draw()
1133
1134 with pytest.raises(RuntimeError):
1135 im.make_image(fig.canvas.get_renderer())
1136
1137
1138def test_imshow_float16():

Callers

nothing calls this directly

Calls 6

imshowMethod · 0.80
subplotsMethod · 0.45
set_extentMethod · 0.45
drawMethod · 0.45
make_imageMethod · 0.45
get_rendererMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…