| 107 | |
| 108 | @check_figures_equal(extensions=['svg']) |
| 109 | def 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']) |