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

Function test_unclipped

lib/matplotlib/tests/test_image.py:1193–1202  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1191
1192
1193def test_unclipped():
1194 fig, ax = plt.subplots()
1195 ax.set_axis_off()
1196 im = ax.imshow([[0, 0], [0, 0]], aspect="auto", extent=(-10, 10, -10, 10),
1197 cmap='gray', clip_on=False)
1198 ax.set(xlim=(0, 1), ylim=(0, 1))
1199 fig.canvas.draw()
1200 # The unclipped image should fill the *entire* figure and be black.
1201 # Ignore alpha for this comparison.
1202 assert (np.array(fig.canvas.buffer_rgba())[..., :3] == 0).all()
1203
1204
1205def test_respects_bbox():

Callers

nothing calls this directly

Calls 6

imshowMethod · 0.80
subplotsMethod · 0.45
set_axis_offMethod · 0.45
setMethod · 0.45
drawMethod · 0.45
buffer_rgbaMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…