| 5145 | |
| 5146 | |
| 5147 | def 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 | |
| 5159 | def test_hist_stacked_step_geometry(): |