()
| 5134 | |
| 5135 | |
| 5136 | def 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 | |
| 5147 | def test_hist_step_bottom_geometry(): |