MCPcopy
hub / github.com/matplotlib/matplotlib / test_eb_line_zorder

Function test_eb_line_zorder

lib/matplotlib/tests/test_axes.py:5638–5663  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

5636@image_comparison(['vline_hline_zorder.png', 'errorbar_zorder.png'], style='mpl20',
5637 tol=0.02 if sys.platform == 'darwin' else 0)
5638def test_eb_line_zorder():
5639 x = list(range(10))
5640
5641 # First illustrate basic pyplot interface, using defaults where possible.
5642 fig = plt.figure()
5643 ax = fig.gca()
5644 ax.plot(x, lw=10, zorder=5)
5645 ax.axhline(1, color='red', lw=10, zorder=1)
5646 ax.axhline(5, color='green', lw=10, zorder=10)
5647 ax.axvline(7, color='m', lw=10, zorder=7)
5648 ax.axvline(2, color='k', lw=10, zorder=3)
5649
5650 ax.set_title("axvline and axhline zorder test")
5651
5652 # Now switch to a more OO interface to exercise more features.
5653 fig = plt.figure()
5654 ax = fig.gca()
5655 x = list(range(10))
5656 y = np.zeros(10)
5657 yerr = list(range(10))
5658 ax.errorbar(x, y, yerr=yerr, zorder=5, lw=5, color='r')
5659 for j in range(10):
5660 ax.axhline(j, lw=5, color='k', zorder=j)
5661 ax.axhline(-j, lw=5, color='k', zorder=j)
5662
5663 ax.set_title("errorbar zorder test")
5664
5665
5666@check_figures_equal()

Callers

nothing calls this directly

Calls 7

figureMethod · 0.80
gcaMethod · 0.80
axhlineMethod · 0.80
axvlineMethod · 0.80
plotMethod · 0.45
set_titleMethod · 0.45
errorbarMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…