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

Function test_rasterized_ordering

lib/matplotlib/tests/test_backend_svg.py:109–128  ·  view source on GitHub ↗
(fig_test, fig_ref)

Source from the content-addressed store, hash-verified

107
108@check_figures_equal(extensions=['svg'])
109def test_rasterized_ordering(fig_test, fig_ref):
110 t = np.arange(0, 100) * (2.3)
111 x = np.cos(t)
112 y = np.sin(t)
113
114 ax_ref = fig_ref.subplots()
115 ax_ref.set_xlim(0, 3)
116 ax_ref.set_ylim(-1.1, 1.1)
117 ax_ref.plot(x, y, "-", c="r", lw=10, rasterized=True)
118 ax_ref.plot(x+1, y, "-", c="b", lw=10, rasterized=False)
119 ax_ref.plot(x+2, y, "-", c="g", lw=10, rasterized=True)
120 ax_ref.plot(x+3, y, "-", c="m", lw=10, rasterized=True)
121
122 ax_test = fig_test.subplots()
123 ax_test.set_xlim(0, 3)
124 ax_test.set_ylim(-1.1, 1.1)
125 ax_test.plot(x, y, "-", c="r", lw=10, rasterized=True, zorder=1.1)
126 ax_test.plot(x+2, y, "-", c="g", lw=10, rasterized=True, zorder=1.3)
127 ax_test.plot(x+3, y, "-", c="m", lw=10, rasterized=True, zorder=1.4)
128 ax_test.plot(x+1, y, "-", c="b", lw=10, rasterized=False, zorder=1.2)
129
130
131@check_figures_equal(tol=5, extensions=['svg', 'pdf'])

Callers

nothing calls this directly

Calls 4

subplotsMethod · 0.45
set_xlimMethod · 0.45
set_ylimMethod · 0.45
plotMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…