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

Function test_downsampling_speckle

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

Source from the content-addressed store, hash-verified

1781
1782@image_comparison(['downsampling_speckle.png'], style='mpl20', remove_text=True)
1783def test_downsampling_speckle():
1784 fig, axs = plt.subplots(1, 2, figsize=(5, 2.7), sharex=True, sharey=True,
1785 layout="compressed")
1786 axs = axs.flatten()
1787 img = ((np.arange(1024).reshape(-1, 1) * np.ones(720)) // 50).T
1788
1789 cm = plt.get_cmap("viridis").with_extremes(over="m")
1790 norm = colors.LogNorm(vmin=3, vmax=11)
1791
1792 # old default cannot be tested because it creates over/under speckles
1793 # in the following that are machine dependent.
1794
1795 axs[0].set_title("interpolation='auto', stage='rgba'")
1796 axs[0].imshow(np.triu(img), cmap=cm, norm=norm, interpolation_stage='rgba')
1797
1798 # Should be same as previous
1799 axs[1].set_title("interpolation='auto', stage='auto'")
1800 axs[1].imshow(np.triu(img), cmap=cm, norm=norm)
1801
1802
1803@image_comparison(

Callers

nothing calls this directly

Calls 5

imshowMethod · 0.80
subplotsMethod · 0.45
with_extremesMethod · 0.45
get_cmapMethod · 0.45
set_titleMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…