Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 08ad482

Browse files
authored
Merge pull request #11978 from meeseeksmachine/auto-backport-of-pr-11973-on-v3.0.x
Backport PR #11973 on branch v3.0.x
2 parents 8d781c3 + edc537e commit 08ad482

File tree

1 file changed

+8
-11
lines changed

1 file changed

+8
-11
lines changed

lib/matplotlib/tests/test_axes.py

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2996,24 +2996,21 @@ def test_hist_stacked_step():
29962996
ax.hist((d1, d2), histtype="step", stacked=True)
29972997

29982998

2999-
@image_comparison(baseline_images=['hist_stacked_normed'])
3000-
def test_hist_stacked_normed():
3001-
# make some data
3002-
d1 = np.linspace(1, 3, 20)
3003-
d2 = np.linspace(0, 10, 50)
3004-
fig, ax = plt.subplots()
3005-
with pytest.warns(UserWarning):
3006-
ax.hist((d1, d2), stacked=True, normed=True)
3007-
3008-
3009-
@image_comparison(baseline_images=['hist_stacked_normed'], extensions=['png'])
2999+
@image_comparison(baseline_images=['hist_stacked_normed',
3000+
'hist_stacked_normed'])
30103001
def test_hist_stacked_density():
30113002
# make some data
30123003
d1 = np.linspace(1, 3, 20)
30133004
d2 = np.linspace(0, 10, 50)
3005+
30143006
fig, ax = plt.subplots()
30153007
ax.hist((d1, d2), stacked=True, density=True)
30163008

3009+
# Also check that the old keyword works.
3010+
fig, ax = plt.subplots()
3011+
with pytest.warns(UserWarning):
3012+
ax.hist((d1, d2), stacked=True, normed=True)
3013+
30173014

30183015
@pytest.mark.parametrize('normed', [False, True])
30193016
@pytest.mark.parametrize('density', [False, True])

0 commit comments

Comments
 (0)