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

Function test_hist_step_filled

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

Source from the content-addressed store, hash-verified

2537
2538@image_comparison(['hist_step_filled.png'], remove_text=True, style='_classic_test')
2539def 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')

Callers

nothing calls this directly

Calls 6

histMethod · 0.80
subplotsMethod · 0.45
set_titleMethod · 0.45
set_ylimMethod · 0.45
get_facecolorMethod · 0.45
get_edgecolorMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…