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

Function test_hist_step_geometry

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

Source from the content-addressed store, hash-verified

5134
5135
5136def test_hist_step_geometry():
5137 bins = [0, 1, 2, 3]
5138 data = [0, 0, 1, 1, 1, 2]
5139 top = [[0, 0], [0, 2], [1, 2], [1, 3], [2, 3], [2, 1], [3, 1], [3, 0]]
5140 bottom = [[2, 0], [2, 0], [1, 0], [1, 0], [0, 0]]
5141
5142 for histtype, xy in [('step', top), ('stepfilled', top + bottom)]:
5143 _, _, (polygon, ) = plt.hist(data, bins=bins, histtype=histtype)
5144 assert_array_equal(polygon.get_xy(), xy)
5145
5146
5147def test_hist_step_bottom_geometry():

Callers

nothing calls this directly

Calls 2

histMethod · 0.80
get_xyMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…