()
| 2537 | |
| 2538 | @image_comparison(['hist_step_filled.png'], remove_text=True, style='_classic_test') |
| 2539 | def test_hist_step_filled(): |
| 2540 | np.random.seed(0) |
| 2541 | x = np.random.randn(1000, 3) |
| 2542 | n_bins = 10 |
| 2543 | |
| 2544 | kwargs = [{'fill': True}, {'fill': False}, {'fill': None}, {}]*2 |
| 2545 | types = ['step']*4+['stepfilled']*4 |
| 2546 | fig, axs = plt.subplots(nrows=2, ncols=4) |
| 2547 | |
| 2548 | for kg, _type, ax in zip(kwargs, types, axs.flat): |
| 2549 | ax.hist(x, n_bins, histtype=_type, stacked=True, **kg) |
| 2550 | ax.set_title(f'{kg}/{_type}') |
| 2551 | ax.set_ylim(bottom=-50) |
| 2552 | |
| 2553 | patches = axs[0, 0].patches |
| 2554 | assert all(p.get_facecolor() == p.get_edgecolor() for p in patches) |
| 2555 | |
| 2556 | |
| 2557 | @image_comparison(['hist_density.png'], style='mpl20') |
nothing calls this directly
no test coverage detected
searching dependent graphs…