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

Function test_hist_step_bottom_geometry

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

Source from the content-addressed store, hash-verified

5145
5146
5147def test_hist_step_bottom_geometry():
5148 bins = [0, 1, 2, 3]
5149 data = [0, 0, 1, 1, 1, 2]
5150 top = [[0, 1], [0, 3], [1, 3], [1, 5], [2, 5], [2, 2.5], [3, 2.5], [3, 1.5]]
5151 bottom = [[2, 1.5], [2, 2], [1, 2], [1, 1], [0, 1]]
5152
5153 for histtype, xy in [('step', top), ('stepfilled', top + bottom)]:
5154 _, _, (polygon, ) = plt.hist(data, bins=bins, bottom=[1, 2, 1.5],
5155 histtype=histtype)
5156 assert_array_equal(polygon.get_xy(), xy)
5157
5158
5159def test_hist_stacked_step_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…