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

Function test_stairs_baseline_None

lib/matplotlib/tests/test_axes.py:2749–2759  ·  view source on GitHub ↗
(fig_test, fig_ref)

Source from the content-addressed store, hash-verified

2747
2748@check_figures_equal()
2749def test_stairs_baseline_None(fig_test, fig_ref):
2750 x = np.array([0, 2, 3, 5, 10])
2751 y = np.array([1.148, 1.231, 1.248, 1.25])
2752
2753 test_axes = fig_test.add_subplot()
2754 test_axes.stairs(y, x, baseline=None)
2755
2756 style = {'solid_joinstyle': 'miter', 'solid_capstyle': 'butt'}
2757
2758 ref_axes = fig_ref.add_subplot()
2759 ref_axes.plot(x, np.append(y, y[-1]), drawstyle='steps-post', **style)
2760
2761
2762def test_stairs_empty():

Callers

nothing calls this directly

Calls 3

add_subplotMethod · 0.80
stairsMethod · 0.80
plotMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…