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

Skip to content

Commit fd4e79c

Browse files
authored
Merge pull request #11977 from meeseeksmachine/auto-backport-of-pr-11973-on-v2.2.x
Backport PR #11973 on branch v2.2.x
2 parents 29ce489 + 3f890dc commit fd4e79c

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
@@ -2913,24 +2913,21 @@ def test_hist_stacked_step():
29132913
ax.hist((d1, d2), histtype="step", stacked=True)
29142914

29152915

2916-
@image_comparison(baseline_images=['hist_stacked_normed'])
2917-
def test_hist_stacked_normed():
2918-
# make some data
2919-
d1 = np.linspace(1, 3, 20)
2920-
d2 = np.linspace(0, 10, 50)
2921-
fig, ax = plt.subplots()
2922-
with pytest.warns(UserWarning):
2923-
ax.hist((d1, d2), stacked=True, normed=True)
2924-
2925-
2926-
@image_comparison(baseline_images=['hist_stacked_normed'], extensions=['png'])
2916+
@image_comparison(baseline_images=['hist_stacked_normed',
2917+
'hist_stacked_normed'])
29272918
def test_hist_stacked_density():
29282919
# make some data
29292920
d1 = np.linspace(1, 3, 20)
29302921
d2 = np.linspace(0, 10, 50)
2922+
29312923
fig, ax = plt.subplots()
29322924
ax.hist((d1, d2), stacked=True, density=True)
29332925

2926+
# Also check that the old keyword works.
2927+
fig, ax = plt.subplots()
2928+
with pytest.warns(UserWarning):
2929+
ax.hist((d1, d2), stacked=True, normed=True)
2930+
29342931

29352932
@pytest.mark.parametrize('normed', [False, True])
29362933
@pytest.mark.parametrize('density', [False, True])

0 commit comments

Comments
 (0)